Created
February 15, 2015 18:47
-
-
Save lykkin/2a66f41bf79880b79432 to your computer and use it in GitHub Desktop.
tail call map
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
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