Skip to content

Instantly share code, notes, and snippets.

@adambene
Created January 13, 2017 21:56
Show Gist options
  • Save adambene/1640053a1048f3e2acb0809becb144d5 to your computer and use it in GitHub Desktop.
Save adambene/1640053a1048f3e2acb0809becb144d5 to your computer and use it in GitHub Desktop.
Pattern Matching in JavaScript - Haskell map
map _ [] = []
map f (x:xs) = f x : map f xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment