Hacker News new | ask | show | jobs
by endgame 1391 days ago
The solution to this is a package like https://hackage.haskell.org/package/foldl , which lets you fuse multiple traversals of a lazy list into a single pass and get the laziness right.