mapOrAccumulate

inline fun <Error, A, B> Raise<Error>.mapOrAccumulate(iterable: Iterable<A>, combine: (Error, Error) -> Error, transform: RaiseAccumulate<Error>.(A) -> B): List<B>(source)

Transform every element of iterable using the given transform, or accumulate all the occurred errors using combine.

See the Arrow docs for more information over error accumulation and how to use it in validation.


inline fun <Error, A, B> Raise<NonEmptyList<Error>>.mapOrAccumulate(iterable: Iterable<A>, transform: RaiseAccumulate<Error>.(A) -> B): List<B>(source)

Accumulate the errors obtained by executing the transform over every element of iterable.

See the Arrow docs for more information over error accumulation and how to use it in validation.


inline fun <Error, A, B> Raise<Error>.mapOrAccumulate(sequence: Sequence<A>, combine: (Error, Error) -> Error, transform: RaiseAccumulate<Error>.(A) -> B): List<B>(source)

Transform every element of sequence using the given transform, or accumulate all the occurred errors using combine.

See the Arrow docs for more information over error accumulation and how to use it in validation.


inline fun <Error, A, B> Raise<NonEmptyList<Error>>.mapOrAccumulate(sequence: Sequence<A>, transform: RaiseAccumulate<Error>.(A) -> B): List<B>(source)

Accumulate the errors obtained by executing the transform over every element of sequence.

See the Arrow docs for more information over error accumulation and how to use it in validation.


inline fun <Error, A, B> Raise<NonEmptyList<Error>>.mapOrAccumulate(nonEmptyList: NonEmptyList<A>, transform: RaiseAccumulate<Error>.(A) -> B): NonEmptyList<B>(source)

Accumulate the errors obtained by executing the transform over every element of NonEmptyList.

See the Arrow docs for more information over error accumulation and how to use it in validation.


inline fun <Error, A, B> Raise<NonEmptyList<Error>>.mapOrAccumulate(nonEmptySet: NonEmptySet<A>, transform: RaiseAccumulate<Error>.(A) -> B): NonEmptySet<B>(source)

Accumulate the errors obtained by executing the transform over every element of NonEmptySet.

See the Arrow docs for more information over error accumulation and how to use it in validation.


inline fun <K, Error, A, B> Raise<Error>.mapOrAccumulate(map: Map<K, A>, combine: (Error, Error) -> Error, transform: RaiseAccumulate<Error>.(Map.Entry<K, A>) -> B): Map<K, B>(source)
inline fun <K, Error, A, B> Raise<NonEmptyList<Error>>.mapOrAccumulate(map: Map<K, A>, transform: RaiseAccumulate<Error>.(Map.Entry<K, A>) -> B): Map<K, B>(source)