Created
February 18, 2015 01:24
-
-
Save elvinio/be50d0cacd24747faee5 to your computer and use it in GitHub Desktop.
Reverse string in haskell
This file contains 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
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