Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Study of non-programmers' solutions to programming problems [pdf]. Parent comment
Maybe. Compare your function to the equivalent Erlang one:
sum(L) -> sum(L, 0). sum([], Acc) -> Acc; sum([Num|Rest], Acc) -> sum(Rest, Acc+Num).
math:sum([5,4,3,2,1]). 15
There are no comments on this comment yet.
Maybe. Compare your function to the equivalent Erlang one:
Assuming that it's in a module called 'math', run it like so: