- Define Function in Shell is Different:
http://stackoverflow.com/questions/3612628/erlang-getting-error-1-syntax-error-before
Sum = fun([], _) -> 0; ([H | T], F) -> H + F(T, F) end,
Sum([1,2,3], Sum).
http://stackoverflow.com/questions/3612628/erlang-getting-error-1-syntax-error-before
Sum = fun([], _) -> 0; ([H | T], F) -> H + F(T, F) end,
Sum([1,2,3], Sum).