How many ways are there to describe the Fibonacci sequence in Perl 6?
I've been looking at the various ways of constructing lazy lists in Perl 6 and I would like to collect all of the concise ways of describing the Fibonacci sequence. I will start this off with the three from masak 's journal: my @fibs := (0, 1, -> $a, $b { $a + $b } ... *); my @fibs := (0, 1, { $^a + $^b } ... *); my @fibs := (0, 1, *+* ... *); I was thinking something like this would also work, but I think I have the syntax wrong: my @fibs := (0, 1, (@fibs Z+ @fibs[1..*])); Something there is eager (the slice?) and causes Rakudo to enter an infinite loop. It's a translation of the Haskell