traverseList<E, A, B> static method

IOEither<E, List<B>> traverseList<E, A, B>(
  1. List<A> list,
  2. IOEither<E, B> f(
    1. A a
    )
)

Map each element in the list to a IOEither using the function f, and collect the result in an IOEither<E, List<B>>.

Same as IOEither.traverseListWithIndex but without index in the map function.

Implementation

static IOEither<E, List<B>> traverseList<E, A, B>(
  List<A> list,
  IOEither<E, B> Function(A a) f,
) =>
    traverseListWithIndex<E, A, B>(list, (a, _) => f(a));