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: Javascript ES6
Length: 70
Solution: (Produces a full array output as expected, and values of n under 0 produce an empty array.)
f=(n)=>n<0?[]:(a=f(n-1),n==0?[0]:n==1?[0,1]:a.concat([a[n-1]+a[n-2]]))