[erlang-questions] tail recursion

Jason Dusek <>
Thu May 31 20:28:04 CEST 2007


On 5/31/07, Mike McNally <> wrote:
> Why not rewrite it:
>
>   server({X, Y} = State) ->
>     server(receive
>       {update, NewState} -> NewState;
>       {x, Client} -> Client ! X, State;
>       {y, Client} -> Client ! Y, State
>     end).

Wow. You have revealed receive to me.

-- 
_jsn



More information about the erlang-questions mailing list