purescript/purescript-foldable-traversable

use naive Lazy List `foldr`

Closed this issue · 1 comments

Currently, Data.List.Lazy defines foldr in terms of foldl on a reversed list. This preserves stack safety.

Might it be worth sacrificing stack safety to allow foldr to work with potentially very large or infinite lists by using the naive definition (trusting the user to use a lazy operation)? If not, is that worth having as a separate function?

posted in the wrong repo