[erlang-questions] Idiom for multiple case matches

David Mercer dmercer@REDACTED
Mon Nov 10 18:05:15 CET 2008


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. :-)




More information about the erlang-questions mailing list