Higher order receieve anybody

Chris Pressey <>
Tue Feb 17 21:04:22 CET 2004


On Tue, 17 Feb 2004 10:10:31 +0100 (CET)
Joe Armstrong <> wrote:

> What Uffe and Vlad *really* need is a "higher order" receives ...
> 
> The idea is to rewrite:
> 
> 	receive
> 	   {a, X} -> ...
> 	   b -> 
> 	   Y -> ...
> 	end
> 
> as
> 
> 	F = fun({a,X}) -> ...	
> 	       (b) -> ...
> 	       (Y) -> ...
> 	    end,
> 	Z = receive F,
> 	
> 
> If we introduce an infix ? operator, we'd get:
> 
> 	Z = ?F

s/infix/prefix/g

Does this mean that funs will be able to have an 'after' clause?  :)

-Chris



More information about the erlang-questions mailing list