Created
August 3, 2021 16:49
-
-
Save elessime/1bd5ad11040f438c60ce69752c037d91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
speller :: [[Char]] -> [Char] | |
speller a | |
| null a = [] | |
| otherwise = [head (head a)] ++ " is for " ++ head a ++ (if length (tail a) == 1 then " and " else if null (tail a) then "" else ", ") ++ speller (tail a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment