Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fold_first doesn't use internal iteration #98

Closed
brycelelbach opened this issue Jul 13, 2023 · 2 comments
Closed

fold_first doesn't use internal iteration #98

brycelelbach opened this issue Jul 13, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@brycelelbach
Copy link
Collaborator

@tcbrindle says we should fix that at some point!

@tcbrindle tcbrindle added the enhancement New feature or request label Jul 13, 2023
@tcbrindle
Copy link
Owner

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.

@tcbrindle
Copy link
Owner

Superseded by #99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants