Closed brycelelbach closed 1 year ago
I'm marking this as an enhancement because fold_first()
is not currently broken, it just could be better.
In order to make it better we'd need to change or extend the internal iteration API somewhat, so that we could say to a sequence "iterate over your elements starting from this cursor position", or "iterate over your elements between these two cursor positions". We don't currently have a way of doing that.
Internal iteration can be such a performance win when you can stay in the "happy path" that it's probably worth finding a way to do it, even though I'm generally reluctant to add any more sequence customisation points.
Superseded by #99
@tcbrindle says we should fix that at some point!