Skip to content

Instantly share code, notes, and snippets.

@jdewind
Created December 4, 2012 01:56
Show Gist options
  • Save jdewind/4199838 to your computer and use it in GitHub Desktop.
Save jdewind/4199838 to your computer and use it in GitHub Desktop.
Alternative Map Implementations
map' :: (a -> b) -> [a] -> [b]
map' _ [] = []
map' f xs = [f a | a <- xs]
map' :: (a -> b) -> [a] -> [b]
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