No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I agree with you here that ordered matching of sigs is convenient, even though it isn't as clear. Standard ML guarantees ordered matching in functions (and also in lambdas and case expressions), so you can say this: (this is not the best way to define factorial though). Prolog also matches the heads of predicate definitions in order. Mathematica is a bit different. It matches argument lists to more specific patterns first, and when it is not clear which pattern is more specific, it matches them in order. In reply to Re^11: 99 Problems in Perl6
by ambrus
|
|