OR construction in erlang ?

Olivier <>
Tue Apr 12 23:26:51 CEST 2005


Hehe tricked me here, bad example ;)
let's pretend it does not return true or false then...

--
Olivier

Le 12 avr. 05, à 22:51, Mark Scandariato a écrit :

> Since lists:member/2 returns true or false, you're in luck:
>
> lists:member(Key, List) orelse throw(key_error),
> lists:member(Key2, List) andalso throw(key2_error),
>
>
> Mark.
>
> Olivier wrote:
>
>> I guess I'll have to do that, but it is basically a case / catch 
>> syntax : how would you do it in this case:
>> ...
>> true = lists:member(Key, List),
>> false = lists:member(Key2, List),
>> ...
>




More information about the erlang-questions mailing list