Return the first N items of the Fibonacci sequence.
The input will be a whole number greater than or equal to zero.
The output should be iterable.
Examples:
(0) => [0]
(5) => [0, 1, 1, 2, 3, 5]
(9) => [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
*^You can assume that you will always recieved valid input
Language: Perl 6
Length:
292826Solution:
sub fi{(0,1,*+*…∞)[0..$^a]}
Demo: