sequenceList<A> static method

Option<List<A>> sequenceList<A>(
  1. List<Option<A>> list
)

Convert a List<Option<A>> to a single Option<List<A>>.

If any of the Option in the List is None, then the result is None.

Implementation

static Option<List<A>> sequenceList<A>(
  List<Option<A>> list,
) =>
    traverseList(list, identity);