Slide 28
Slide 28 text
Send message
to self()
{Bob, sushi_score}
Process ല
bob_loop(State) ->
receive
{Sender, 'how_is_sushi?'} ->
(self() ! {self(), sushi_score}),
receive {ok, Score} ->
Sender ! {ok,Score > 90}
end;
{Sender, sushi_score} ->
Sender ! {ok, 9000}
end,
bob_loop(State).