[erlang-questions] case and pattern matching
Tue Jul 10 12:08:31 CEST 2007
What do you do when two clauses in your case statement need to share
the code? Do you create an anonymous function and reuse it?
I really wish there was a way to combine patterns but I can't seem to
find any. Consider the following bit of Mnesia code:
init_indecies(Tab, Storage, PosList) ->
case Storage of
What I would like to do is join unknown and s3_copies or maybe
ram_copies and disc_copies in a single pattern match like
uknown | s3_copies -> ...
Is this possible?
http://topdog.cc - EasyLanguage to C# compiler
http://wagerlabs.com - Blog
More information about the erlang-questions