in reply to Re^3: rough approximation to pattern matching using local (Multi Subs)
in thread rough approximation to pattern matching using local
But I'm afraid you are missing the point here.
"pattern matching" a la Haskell allows to filter for literal arguments not only types like demonstrated for multi subs.
For instance a naive Fibonacci (in pseudo-code) can look like this
Multi fib(0|1) = { 1 }; Multi fib($i) = { fib($i-1) + fib($i-2) };
Can I do this with multi subs in Perl 6?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: rough approximation to pattern matching using local (Multi Subs)
by raiph (Deacon) on Jan 29, 2015 at 07:50 UTC | |
by LanX (Saint) on Jan 29, 2015 at 08:33 UTC |