Advertisement
Guest User

Untitled

a guest
Feb 7th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #!/usr/bin/env perl
  2.  
  3. use warnings; use strict; use Kavorka -all; use feature 'say';
  4.  
  5. multi fun fib (Int $n where { $_ == 1 }) { 1}
  6. multi fun fib (Int $n where { $_ == 2 }) { 1}
  7. multi fun fib (Int $n where { $_ >= 3 }) { fib($n - 1)
  8. + fib($n - 2)}
  9.  
  10. say fib(17);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement