I have the following code
loop(Data) ->
receive
{Key, Value} ->
[{Key, Value}|Data];
{Key} ->
member(Key, Data);
14 loop(Data);
stop ->
io:format("server_stopped"),
ok
end .
and I get the following error (I put the line number 14 in the code)
./dist_erlang.erl:14: syntax error before: ';' ./dist_erlang.erl:2: function loop/1 undefined ./dist_erlang.erl:28: Warning: function member/2 is unused
I am not sure what the syntax problem is with the above code. I have a method called member which is giving the error because of a different syntax error on line 14 I am sure.
Any help is appreciated thanks.