[erlang-questions] Idiom for multiple case matches

Hynek Vychodil vychodil.hynek@REDACTED
Fri Nov 7 16:07:52 CET 2008


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

> "Robert Virding" <rvirding@REDACTED> 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
> erlang-questions@REDACTED
> 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.htm>


More information about the erlang-questions mailing list