Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Last active August 29, 2015 14:05
sub fib(int $n) {
$n < 2 ?? $n !! fib( $n - 1 ) + fib( $n - 2 );
}
my $N = 30;
print "fib($N) = " ~ fib($N) ~ "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment