Skip to content

Instantly share code, notes, and snippets.

@bobbywilson0
Created August 19, 2013 17:19
Show Gist options
  • Save bobbywilson0/6271634 to your computer and use it in GitHub Desktop.
Save bobbywilson0/6271634 to your computer and use it in GitHub Desktop.
defmodule MyMod do
def sum(list)
Enum.reduce(list, 0, fn(x, acc) -> x + acc end)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment