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

Implement #skip: for negative arguments (or just -1) #123

Open
daniels220 opened this issue Sep 30, 2023 · 0 comments
Open

Implement #skip: for negative arguments (or just -1) #123

daniels220 opened this issue Sep 30, 2023 · 0 comments

Comments

@daniels220
Copy link
Contributor

Thanks for taking care of the gotcha in pharo#11150. As a follow-up, it would be nice if Zinc streams could support #skip: with negative arguments—or, if fully-general negative skips are difficult to implement, at least the special case of skipping backward exactly one, as in #back. There are many cases where, due to the available methods in the rest of the Stream API, it is more convenient to over-consume and then backtrack rather than use #peek—for instance #upTo: consumes the passed delimiter, which is often appropriate but not always.

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

No branches or pull requests

1 participant