Skip to content

Chapter 2#1

Open
superaghu wants to merge 2 commits intomasterfrom
feature/chapter2
Open

Chapter 2#1
superaghu wants to merge 2 commits intomasterfrom
feature/chapter2

Conversation

@superaghu
Copy link
Owner

No description provided.

Copy link
Owner Author

Choose a reason for hiding this comment

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

This was my effort to see if I can create this function without using method. Although realized method is needed for the arguments.


public static final Function<Integer, Function<Integer, Integer>> add = null; // To be implemented
//why does x is highlighted by intelliJ as purple with under score?
public static final Function<Integer, Function<Integer, Integer>> add = x -> y -> x + y;
Copy link
Owner Author

Choose a reason for hiding this comment

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

why does x is highlighted by intelliJ as purple with under score?

return x -> y -> z -> x.apply(y.apply(z));
}

// static <T, U, V> Function<> higherCompose2() {
Copy link
Owner Author

Choose a reason for hiding this comment

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

It was much easier to write the lambda, but its harder to find the type.

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

Comments