traverseList<S, A, B> static method
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));