Skip to content

Instantly share code, notes, and snippets.

@elvinio
Created February 18, 2015 01:24
Show Gist options
  • Save elvinio/be50d0cacd24747faee5 to your computer and use it in GitHub Desktop.
Save elvinio/be50d0cacd24747faee5 to your computer and use it in GitHub Desktop.
Reverse string in haskell
reverse' :: [a] -> [a]
reverse' [] = []
reverse' [x] = [x]
reverse' (x:xs) = reverse'(xs) ++ [x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment