traverseList<S, A, B> static method

State<S, List<B>> traverseList<S, A, B>(
  1. List<A> list,
  2. State<S, B> f(
    1. A a
    )
)

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

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

Implementation

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