traverseState<S, B> method

State<S, List<B>> traverseState<S, B>(
  1. State<S, B> f(
    1. T a
    )
)

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

Implementation

State<S, List<B>> traverseState<S, B>(
  State<S, B> Function(T a) f,
) =>
    State.traverseList(toList(), f);