2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1 +1 @@
my constant @fib = 0, 1, *+* ... *;
constant @fib = 0, 1, *+* ... *;

View file

@ -1,2 +1,2 @@
my constant @neg_fib = 0, 1, *-* ... *;
sub fib ($n) { $n >= 0 and @fib[$n] or @neg_fib[-$n]; }
constant @neg-fib = 0, 1, *-* ... *;
sub fib ($n) { $n >= 0 ?? @fib[$n] !! @neg-fib[-$n] }

View file

@ -1,3 +1,4 @@
use experimental :cached;
proto fib (Int $n --> Int) is cached {*}
multi fib (0) { 0 }
multi fib (1) { 1 }