-
Notifications
You must be signed in to change notification settings - Fork 252
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 withFirst(): extract first stream element #50
Labels
Milestone
Comments
amaembo
added a commit
that referenced
this issue
Jan 12, 2016
amaembo
added a commit
that referenced
this issue
Jan 12, 2016
amaembo
added a commit
that referenced
this issue
Jan 12, 2016
better parallelization is impossible for such interface); more tests
amaembo
added a commit
that referenced
this issue
Jan 12, 2016
amaembo
added a commit
that referenced
this issue
Jan 13, 2016
when outer closed; support of null; javaDoc
amaembo
added a commit
that referenced
this issue
Jan 13, 2016
amaembo
added a commit
that referenced
this issue
Jan 14, 2016
8 tasks
amaembo
added a commit
that referenced
this issue
Jan 15, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes it's useful to extract the first stream element and use it to process other elements. Some solutions are proposed and discussed here. In StreamEx we must make such operation lazy: it should not consume any stream elements until the terminal operation is performed.
Two possible versions are proposed:
The biggest problem is the current
flatMap
bug: this code must produce 1, 2, 3, 4, 5Issue #54 extracted from this one as it's substantially different.
The text was updated successfully, but these errors were encountered: