Skip to content

Instantly share code, notes, and snippets.

@dskecse
Last active October 12, 2015 12:59
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 dskecse/f3f4c9524123972efc99 to your computer and use it in GitHub Desktop.
Save dskecse/f3f4c9524123972efc99 to your computer and use it in GitHub Desktop.
defmodule Recursive do
def map([], _func), do: []
def map([head | tail], func), do: [func.(head) | map(tail, func)]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment