Skip to content

Conversation

@afs
Copy link
Member

@afs afs commented May 28, 2019

No description provided.


public class OpLib
{
public static Op sub(Op1 op) { return op==null ? null : op.getSubOp() ; }
Copy link
Member

Choose a reason for hiding this comment

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

Did these guys just not get any use?

Copy link
Member Author

@afs afs May 28, 2019

Choose a reason for hiding this comment

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

No use. Deleting them had no effect.

Copy link
Member

Choose a reason for hiding this comment

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

Got it, makes sense.

* and then returns a new stream of the same elements.
*/
public static <X> Stream<X> print(Stream<X> stream) {
stream = stream.map(item -> { System.out.println(item); return item; });
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this line just stream = stream.peek(System.out::println)?

Copy link
Member

Choose a reason for hiding this comment

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

Oops-- just realized this isn't part of the PR, sorry!

@afs afs merged commit 34cc2b3 into apache:master May 30, 2019
@afs afs deleted the migrate branch May 30, 2019 11:27
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.

2 participants