traverseTaskOptionSeq<B> method
Map each element in the list to a TaskOption
using the function f
,
and collect the result in an TaskOption<List<B>>
.
Each TaskOption
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 TaskOption
to be executed in parallel, use traverseListWithIndex
.
Implementation
TaskOption<List<B>> traverseTaskOptionSeq<B>(
TaskOption<B> Function(T a) f,
) =>
TaskOption.traverseListSeq(toList(), f);