traverseStateWithIndex<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>> traverseStateWithIndex<S, B>(
State<S, B> Function(T a, int i) f,
) =>
State.traverseListWithIndex(toList(), f);