Skip to content

Instantly share code, notes, and snippets.

@Farzy
Last active May 24, 2016 21:08
Show Gist options
  • Save Farzy/b560df9b458cc8844c157b4d648b0b8e to your computer and use it in GitHub Desktop.
Save Farzy/b560df9b458cc8844c157b4d648b0b8e to your computer and use it in GitHub Desktop.
myMap :: (a -> b) -> [a] -> [b]
myMap f [] = []
myMap f (x:xs) = f x : myMap f xs
-- > myMap (+2) [1..3]
-- [3,4,5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment