traverseEitherWithIndex<E, B> method
Map each element in the list to an Either using the function f
,
and collect the result in an Either<E, List<B>>
.
If any mapped element of the list is Left, then the final result will be Left.
Implementation
Either<E, List<B>> traverseEitherWithIndex<E, B>(
Either<E, B> Function(T a, int i) f,
) =>
Either.traverseListWithIndex(toList(), f);