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

part3 completed #180

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

part3 completed #180

wants to merge 2 commits into from

Conversation

deadwolfst
Copy link

Completed by Iartsev Kirill

return new ReachIterable<R>() {
@Override
public boolean tryGet(Consumer<R> c) {
return ReachIterable.this.tryGet(e -> mapper.apply(e).tryGet(c));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect. tryGet can call consumer only once.

@Override
public boolean tryGet(Consumer<T> c) {
return ReachIterable.this.tryGet(e -> {
if (p.test(e)) c.accept(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect. tryGet should either call consumer or return false.

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

Successfully merging this pull request may close these issues.

3 participants