-
Notifications
You must be signed in to change notification settings - Fork 111
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add forEachCollectSome
#1160
base: series/2.x
Are you sure you want to change the base?
Add forEachCollectSome
#1160
Conversation
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.
Looks good to me.
val builder = bf.newBuilder(in) | ||
|
||
lazy val recurse: Option[B] => ZPure[W, S, S, R, E, Collection[B]] = { b => | ||
b.fold(builder)(builder += _) |
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.
Isn't .forEach
clearer here?
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.
makes sense. I changed those
6809853
(#1160)
We already have |
yeah but can't it only be used with the same effect? |
Hello @0pg , are you still interested in getting this merged? Could you please resolve the git conflict? |
Hi, Here comes foreach filter again 馃槄
Added infix syntax
forEachCollectSome
ofcollect
afterforEach
(and there is one more for Iterable optimized, this is why the new syntax added instead of using composition of
collect
afterforEach
on demand)