traverse
inline fun <E, A, B> Either<E, A>.traverse(transform: (value: A) -> Iterable<B>): List<Either<E, B>>(source)
inline fun <E, A, B> Either<E, A>.traverse(transform: (value: A) -> Option<B>): Option<Either<E, B>>(source)
Returns an Either of a list of B results of applying the given transform function to each element(A) in the original collection.
Map a function that returns an Either across the NonEmptyList.
The first Left result from calling the function will be the result, or if no calls result in a Left the result will be a Right(NonEmptyList) of all the B's returned.
Map a function that returns an Option across the NonEmptyList.
The first None result from calling the function will be the result, or if no calls result in a None the result will be a Some(NonEmptyList) of all the B's returned.