Skip to content

Instantly share code, notes, and snippets.

@gwincr11
Last active July 21, 2016 02:57
Show Gist options
  • Save gwincr11/e88e291de500738bfe7429f70fcea7b9 to your computer and use it in GitHub Desktop.
Save gwincr11/e88e291de500738bfe7429f70fcea7b9 to your computer and use it in GitHub Desktop.
defmodule MyList do
def sum([], total), do: total
def sum([ head | tail], total), do: sum(tail, head+total)
end
@danawoodman
Copy link

woo hoo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment