logoalt Hacker News

Y_Y • today at 6:20 PM • 1 reply • view on HN

What I learned, many years ago, is that foldr was a footgun, and that foldl1' was almost certainly what I wanted.


Replies

internet_points • today at 8:22 PM

Don't you mean foldl (non-strict version) is a footgun? I can't think of how foldr is a footgun, at least not in a lazy language.