effect-io-ai

Package: effect
Module: Option

Option.product

Combines two Option values into a single Option containing a tuple of their values if both are Some.

Details

This function takes two Options and combines their values into a tuple [A, B] if both are Some. If either of the Options is None, the result is None. This is particularly useful for combining multiple Option values into a single one, ensuring both contain valid values.

Signature

declare const product: <A, B>(self: Option<A>, that: Option<B>) => Option<[A, B]>

Source

Since v2.0.0