Skip to content

Instantly share code, notes, and snippets.

@lykkin
Created February 15, 2015 18:47
Show Gist options
  • Save lykkin/2a66f41bf79880b79432 to your computer and use it in GitHub Desktop.
Save lykkin/2a66f41bf79880b79432 to your computer and use it in GitHub Desktop.
tail call map
mapz f (x:xs) = (f x):(mapz f xs)
mapz f [] = []
mapa f li = let mapacc f (x:xs) acc = mapacc f xs ((f x):acc)
mapacc f [] acc = acc
in
(reverse (mapacc f li []))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment