RosettaCodeData/Task/Fibonacci-sequence/Haskell/fibonacci-sequence-12.hs

2 lines
64 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fib = 0 : 1 : next fib where next (a: t@(b:_)) = (a+b) : next t