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

Omit explicit parameter types of anonymous functions #66

Merged
merged 4 commits into from
May 20, 2018

Conversation

Kobenko
Copy link
Contributor

@Kobenko Kobenko commented May 18, 2018

We can omit the naming of types, as we mentioned this earlier. Does not interfere with the task.

x * 10
})
.apply(6) should be(res0)
Semigroup[Int => Int].combine({ _ + 1 }, { _ * 10 }).apply(6) should be(res0)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need the curly braces here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. We dont need it

x * 10
})
.apply(6) should be(res0)
Semigroup[Int => Int].combine(_ + 1 , _ * 10).apply(6) should be(res0)
Copy link
Member

Choose a reason for hiding this comment

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

Nice. Would you mind fixing the spaces and then LGTM!

Semigroup[Int => Int].combine(_ + 1, _ * 10).apply(6) should be(res0)

@Kobenko
Copy link
Contributor Author

Kobenko commented May 19, 2018

Thats it. Didn't notice

@FRosner
Copy link
Member

FRosner commented May 20, 2018

Thanks @Kobenko! Merging if no further discussions.

@FRosner FRosner changed the title Short cut Omit explicit parameter types of anonymous functions May 20, 2018
@FRosner FRosner merged commit 575e192 into scala-exercises:master May 20, 2018
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