effect-io-ai

Package: effect
Module: Option

Option.productMany

Combines an Option with a collection of Options into a single Option containing a tuple of their values if all are Some.

Details

This function takes a primary Option and a collection of Options and combines their values into a tuple [A, ...Array<A>] if all are Some. If the primary Option or any Option in the collection is None, the result is None.

Signature

declare const productMany: <A>(self: Option<A>, collection: Iterable<Option<A>>) => Option<[A, ...Array<A>]>

Source

Since v2.0.0