[erlang-questions] Idiom for multiple case matches

mats cronqvist masse@REDACTED
Tue Nov 11 12:19:51 CET 2008


"David Mercer" <dmercer@REDACTED> writes:

> Since this is, semantically, a set operation, should we not perhaps use
> sets:is_element/2 instead?  Something like:
>
> 	vowels() -> sets:from_list("aeiou").
> 	is_vowel(C) -> sets:is_element(C, vowels()).
>
> Just kidding, of course... (Obvious efficiency issues.) :-)
>
> DBM
>
> P.S. No, Mats, I did not benchmark this. :-)

  benchmark is (or at least ought to be) required only if you claim
  *improved* performance...

  mats



More information about the erlang-questions mailing list