Created
February 20, 2011 23:55
-
-
Save l1x/836438 to your computer and use it in GitHub Desktop.
map function
This file contains 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
-spec map(fun((D) -> R), [D]) -> [R]. | |
map(F, [H|T]) -> | |
[F(H)|map(F, T)]; | |
map(F, []) when is_function(F, 1) -> []. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment