-
Notifications
You must be signed in to change notification settings - Fork 451
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
zipOrAccumulate
for Raise
(waiting for #2912 to be merged)
#2880
Conversation
Kover Report
|
zipOrAccumulate
for Raise
zipOrAccumulate
for Raise
(open for discussion)
* Accumulate the errors from running both [action1] and [action2]. | ||
*/ | ||
@EffectDSL | ||
public inline fun <R, A, B, C> Raise<NonEmptyList<R>>.zipOrAccumulate( |
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.
For Either
these are just called zip
, should we also rename them to zipOrAccumulate
? We removed regular zip
since it's equivalent to bind
for short-circuit behavior and we re-used the zip
name for accumulating behavior.
So we should be consistent between Raise
and other data types.
Additionally, in Either
is has signature action1.zip(action2, block)
but it was requested on KotlinLang why it's not Either.zip(action1, action2, block)
that would also align both these signatures further. It might even help back-porting them to 1.x.x easier, WDYT?
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.
I prefer too that version of zip
, so I'm happy to make the change into a different PR, if you want.
@serras not sure I understood what you prefer 😅 |
I prefer writing @nomisRev what should we do about the |
@serras It's a new api that is not yet in The |
Also, here I propose to deprecate the current |
zipOrAccumulate
for Raise
(open for discussion)zipOrAccumulate
for Raise
(waiting for #2912 to be merged)
Just for keeping all history included in the PR history. In the Arrow meeting of 2 February 2023 the decision was made to use |
Closed in favor of #2916 |
This generalizes #2872 by providing a
zipOrAccumulate
operation similar tomapOrAccumulate