-
Notifications
You must be signed in to change notification settings - Fork 248
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 headTail(): map (head, tailStream) to another stream #54
Labels
Milestone
Comments
5 tasks
amaembo
added a commit
that referenced
this issue
Jan 14, 2016
amaembo
added a commit
that referenced
this issue
Jan 14, 2016
amaembo
added a commit
that referenced
this issue
Jan 14, 2016
amaembo
added a commit
that referenced
this issue
Jan 14, 2016
amaembo
added a commit
that referenced
this issue
Jan 14, 2016
amaembo
added a commit
that referenced
this issue
Jan 14, 2016
spliterators after tail call optimization
amaembo
added a commit
that referenced
this issue
Jan 15, 2016
amaembo
added a commit
that referenced
this issue
Jan 17, 2016
sorted, mapFirst), batches now produces incomplete tail as well
amaembo
added a commit
that referenced
this issue
Jan 17, 2016
amaembo
added a commit
that referenced
this issue
Jan 17, 2016
amaembo
added a commit
that referenced
this issue
Jan 18, 2016
amaembo
added a commit
that referenced
this issue
Jan 18, 2016
amaembo
added a commit
that referenced
this issue
Jan 18, 2016
4 tasks
amaembo
added a commit
that referenced
this issue
Jan 20, 2016
amaembo
added a commit
that referenced
this issue
Jan 27, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extracted from #50 as it's substantially different feature.
The following method is proposed:
Such method is really flexible (it allows to implement most of other intermediate operations). The drawback is that it cannot be parallelized well (only poor-man buffered parallelization could be performed) and recursive usage eats the stack (which could be partially solved if TSO can be implemented for some spliterators).
Usage examples.
Prime numbers:
Lazy scanLeft:
Revert stream:
takeWhile op implementation:
takeWhileClosed (including the first violating element):
cycle - infinitely cycles the input, lazy
mirror - this stream, then reversed stream, also lazy
every - take every nth element
the first stream element if nothing matches the predicate; the first matching otherwise
stream of singleton lists to stream of fixed-size batches
stream of singleton lists to stream of sliding windows
Primitive specializations also could be implemented using
BiFunction<Integer, IntStreamEx, IntStream> mapper
, etc. (postponed)The text was updated successfully, but these errors were encountered: