traverseListSeq<A, B> static method
Map each element in the list to a Task using the function f
,
and collect the result in an Task<List<B>>
.
Each Task is executed in sequence. This strategy takes more time than parallel, but it ensures that all the request are executed in order.
If you need Task to be executed in parallel, use traverseListWithIndex
.
Same as Task.traverseListWithIndexSeq
but without index
in the map function.
Implementation
static Task<List<B>> traverseListSeq<A, B>(
List<A> list,
Task<B> Function(A a) f,
) =>
traverseListWithIndexSeq<A, B>(list, (a, _) => f(a));