flattenOrAccumulate

Flatten an Iterable of Either. Alias for mapOrAccumulate over an Iterable of computed Either. Either returns a List containing all Either.Right values, or Either.Left values accumulated using combine.


@JvmName(name = "flattenNelOrAccumulate")
fun <Error, A> Iterable<EitherNel<Error, A>>.flattenOrAccumulate(combine: (Error, Error) -> Error): Either<Error, List<A>>(source)

Flatten an Iterable of Either. Alias for mapOrAccumulate over an Iterable of computed Either. Either returns a List containing all Either.Right values, or EitherNel values accumulated using combine.


Flatten an Iterable of Either. Alias for mapOrAccumulate over an Iterable of computed Either. Either returns a List containing all Either.Right values, or a NonEmptyList of all Either.Left values.


@JvmName(name = "flattenNelOrAccumulate")
fun <Error, A> Iterable<EitherNel<Error, A>>.flattenOrAccumulate(): Either<NonEmptyList<Error>, List<A>>(source)

Flatten an Iterable of Either. Alias for mapOrAccumulate over an Iterable of computed Either. Either returns a List containing all Either.Right values, or a NonEmptyList of all EitherNel values.