3 lines
91 B
Raku
3 lines
91 B
Raku
|
|
constant @neg-fib = 0, 1, *-* ... *;
|
||
|
|
sub fib ($n) { $n >= 0 ?? @fib[$n] !! @neg-fib[-$n] }
|