[erlang-questions] erlang-questions Digest, Vol 12, Issue 98
Mon Jun 2 09:40:06 CEST 2008
John Haugeland wrote:
> Forgive my being naive.
> loop(State) ->
> receive RcvState -> if
> isa_quit(RcvState) -> quit();
> isa_connect(RcvState) -> loop(conn(State));
> isa_disconnect(RcvState) -> loop(disc(State));
> isa_show_about(RcvState) -> loop(show_about(State));
> isa_hide_about(RcvState) -> loop(hide_about(State));
> isa_data(RcvState) -> loop(update(State, RcvState));
> X -> io:fwrite("got ~p~n", [X]), loop(State)
> end end.
> Everything's still named and abstracted, easier to maintain, update
> and repair, but this doesn't require new syntax or compiler
> alterations. So, what am I missing?
that it won't compile?
if lists:member(a,[a,b])->ok end.
** 1: illegal guard expression **
More information about the erlang-questions