Is this actually a lazy left scan?
drewolson opened this issue · 1 comments
drewolson commented
purescript-lists/src/Data/List/Lazy.purs
Line 761 in 62900a5
The more I look at this, the more I am convinced that this is a left scan with the args to the function swapped. The following test seems to confirm this:
> fromFoldable $ scanrLazy (flip (-)) 10 (1..3)
(9 : 7 : 4 : Nil)I believe I named this incorrectly when submitting the PR. Would love more input from folks who are more experienced.
natefaubion commented
Yes, this is a left scan, since you accumulate the head of the list before casing on the tail.