Skip to content

NonEmptyIListOptionOps<A>

extensionNonEmptyIListOptionOps<A>onNonEmptyIList<Option<A>>

Operations available when NonEmptyIList elements are Option values.

Methods

sequence() extension

Option<NonEmptyIList<A>>sequence()

Accumulates all elements in this list as one Option. If any element is a None, None will be returned. If all elements are Some, then the entire list is returned, wrapped in a Some.

Available on NonEmptyIList<A>, provided by the NonEmptyIListOptionOps<A> extension

Implementation
dart
Option<NonEmptyIList<A>> sequence() => traverseOption(identity);