traverseState<S, B> method
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);