Demonstration of the elegance of multi subs.
multi fun fib ( Int $i where { $_ <= 1 } ) { return $i; } multi fun fib ( Int $i ) { return fib($i-1) + fib($i-2); }
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Kavorka, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Kavorka
CPAN shell
perl -MCPAN -e shell install Kavorka
For more information on module installation, please visit the detailed CPAN module installation guide.