DEV Community

Discussion on: Solving the Fibonacci Sequence

Collapse
 
limitedeternity profile image
Marise Hayashi • Edited

Haskell (the classic solution):
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
Then: take 10 fibs

Collapse
 
connollyglen93 profile image
Glen Connolly

This was pretty much exactly what I was looking for. To be completely honest, I knew some functional language would swoop in with a one liner