Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use warnings; use strict; use Kavorka -all; use feature 'say';
- multi fun fib (Int $n where { $_ == 1 }) { 1}
- multi fun fib (Int $n where { $_ == 2 }) { 1}
- multi fun fib (Int $n where { $_ >= 3 }) { fib($n - 1)
- + fib($n - 2)}
- say fib(17);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement