The base signature will look like this (up to arity-9)
Either<E, A>.zip(other: Either<E, B>, combine: (E, E) -> E, transform: (A, B) -> C): Either<E, C>
Either<E, A>.zip(other: Either<E, B>, transform: (A, B) -> C): Either<Nel<E>, C>
Iterable<A>.mapAccumulating(combine: (E, E) -> E, transform: (A) -> Either<E, B>): Either<E, List<B>>
Iterable<A>.mapAccumulating(transform: (A) -> Either<E, B>): Either<Nel<E>, List<B>>
The new
either
DSL will be
inline
so no more need for
eager
or
invoke
and you can just add
suspend
wherever needed ad-hoc. Using the DSL will have the same cost as a single
map
, so it can be used everywhere without any performance hits.