I'm a complete beginner with Haskell and just encountered the following terse expression for constructing the Fibonacci sequence:
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
I think I understand what each individual piece is doing (:
, zipWith
, tail
), and I know some sort of recursion is happening, but am not quite sure how.