[erlang-questions] [clarify] Disjoint when clause

Fredrik Thulin ft@REDACTED
Fri May 16 15:19:10 CEST 2008


Jay Nelson wrote:
> I would like to do the following:
> 
> f(A,B,C) when is_integer(A), is_integer(B), (C =:= foo; C =:= bar) ->
>   do_stuff(A,B,C).

f(A,B,C) when is_integer(A), (C =:= foo orelse C =:= bar) ->
    do_stuff(A,B,C).

(unlike Anders, who were faster, I _have_ tested it ;) )

/Fredrik



More information about the erlang-questions mailing list