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