3 ms·
That's because the entries in fibs are thunks which become very large. This runs in constant space: zipWith' f (x:xs) (y:ys) = let r = f x y in r `seq` r
by tome 11y ago
That's because the entries in fibs are thunks which become very large. This runs in constant space:
zipWith' f (x:xs) (y:ys) = let r = f x y in r `seq` r : zipWith' f xs ys
head (drop (10 ^ 9) (let fibs = 0 : 1 : zipWith max fibs (tail fibs) in fibs))