Chuong
Either<A, X>
A
X
zipOrAccumulate
Alejandro Serrano.Mena
zipOrAccumulate( { firstThing.bind() }, { secondThing.bind() }, ..., ::Pair // or ::Triple, ::Tuple4, ... }
phldavies
inline fun <A, X, R> Iterable<Either<A, X>>.foldOrAccumulate(initial: R, operation: (acc: R, X) -> R): EitherNel<A, R> = either { flattenOrAccumulate().bind().fold(initial, operation) }
Iterable<Either<Error, A>>.flattenOrAccumulate(): Either<NonEmptyList<Error>, List<A>>
foldOrAccumulate
A modern programming language that makes developers happier.