Quantcast
Viewing all articles
Browse latest Browse all 4

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

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

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>