Skip to content

Instantly share code, notes, and snippets.

@elessime
Created August 3, 2021 16:49
Show Gist options
  • Save elessime/1bd5ad11040f438c60ce69752c037d91 to your computer and use it in GitHub Desktop.
Save elessime/1bd5ad11040f438c60ce69752c037d91 to your computer and use it in GitHub Desktop.
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