Created
July 14, 2010 15:09
-
-
Save naush/475518 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
| -- Map | |
| increment x = x + 1 | |
| map increment [1, 2, 3, 4] | |
| -- Map with curry | |
| map (+1) [1, 2, 3, 4] | |
| -- Map with lambda | |
| map (\x = x + 1) [1, 2, 3, 4] | |
| -- Syntactic sugar (list comprehension) | |
| [x + 1 | x <- [1, 2, 3, 4]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment