[erlang-questions] Idiom for multiple case matches

Hynek Vychodil <>
Fri Nov 7 16:07:52 CET 2008


On Fri, Nov 7, 2008 at 3:22 PM, mats cronqvist <> wrote:

> "Robert Virding" <> writes:
>
> > A reasonable way of doing it would be:
> >
> > case is_vowel(Char) of
> >     true -> ... ;
> >     false -> ...
> > end
>
>
> is_wovel(C) -> lists:member(C,"aeiouy").


It is slower than Robert's solution. If performance is significant
lists:member solution is worse.

>
>
>  mats
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



-- 
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081107/0fc37458/attachment.html>


More information about the erlang-questions mailing list