[erlang-questions] an erlang "gotcha"
Thu Apr 5 12:38:26 CEST 2007
Is there a place where difficulties with erlang and their solutions are
described? Perhaps another page at Trapexit.
Here's one that got me.
Pid = spawn(fun() -> io:fwrite("spawned~n") end),
L = [1, 2, 3],
io:fwrite("Pid=~p L=~p~n", [Pid, L]),
is_pid(Pid) and L /=  ->
It prints out "it failed". If you change the 'and' to 'andalso' it works.
Anthony Shipman Mamas don't let your babies
als@REDACTED grow up to be outsourced.
More information about the erlang-questions