Skip to content

Instantly share code, notes, and snippets.

@l1x
Created February 20, 2011 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/836438 to your computer and use it in GitHub Desktop.
Save l1x/836438 to your computer and use it in GitHub Desktop.
map function
-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