[erlang-questions] is this a well written function

Martin Koroudjiev mrtndimitrov@REDACTED
Wed Feb 11 08:11:20 CET 2015


> sum(N) when is_integer(N), N >= 0 ->
>     (N * (N+1)) // 2.
>

Should be with a single forward slash. Also the OP should know that this
function will return a float.



More information about the erlang-questions mailing list