Quantcast
Channel: Erlang getting error ** 1: syntax error before: '->' ** - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Erlang getting error ** 1: syntax error before: '->' **

$
0
0

I have started some hands on in Erlang and I am getting : ** 1: syntax error before: '->' ** whenever i am declaring any function for eg. to calculate sum of a list (this is experimental, of cource there is Built In Function for find sum of a list).

sum([]) -> 0;
sum([H | T]) -> H + sum(T).

in erl shell (v 5.5.5).

Thanks in advance


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images