It's an unfortunate doubling of terminology.
In Haskell you are free to "redefine“ a functions body multiple times for different argument "constellations"
Those args have to "match a pattern", not (necessarily) a regular expressions!
IIRC does Perl 6 have something very similar just named differently... ehm ...
Multi-subs ? ? ?
yes it's called multi-subs in Perl 6, but from the examples I saw so far, I'd say that Haskell is more powerful.
see also http://en.wikibooks.org/wiki/Haskell/Pattern_matching
Pattern matching on what?
Some languages like Perl and Python use the term pattern matching for matching regular expressions against strings. The pattern matching we refer to in Haskell is something completely different. In fact, you're probably best off forgetting what you know about pattern matching for now
Note
In reply to Re^2: rough approximation to pattern matching using local (Multi Subs)
by LanX
in thread rough approximation to pattern matching using local
by gregory-nisbet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |