-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Elaborate on Foldable#collectFirst comment #2278
Conversation
it would make sense to add to the comment, which is a general trick to avoid calling both isDefined and apply, but also to avoid using lift. |
I'll add a mention of that. |
Codecov Report
@@ Coverage Diff @@
## master #2278 +/- ##
=======================================
Coverage 94.97% 94.97%
=======================================
Files 337 337
Lines 5832 5832
Branches 217 217
=======================================
Hits 5539 5539
Misses 293 293
Continue to review full report at Codecov.
|
Finally found a moment to add more info, please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kubukoz! This trick is new to me, so I definitely appreciate the explanation :)
👍 |
* Fix typo in Foldable comment * Update Foldable.scala
btw. would it make sense to say more about the trick used?