3 ms·
Or the even more succinct fibs = 0 : scanl (+) 1 fibs scanl is similar to a fold, but returns a list of successive reduced values from the left.
by tromp 8y ago
Or the even more succinct
fibs = 0 : scanl (+) 1 fibs
scanl is similar to a fold, but returns a list of successive reduced values from the left.
- squirrelicus 8y agoThat's fantastic!