MCPcopy
hub / github.com/Effect-TS/effect / product

Function product

packages/effect/src/Option.ts:1310–1311  ·  view source on GitHub ↗
(self: Option<A>, that: Option<B>)

Source from the content-addressed store, hash-verified

1308 * @since 2.0.0
1309 */
1310export const product = <A, B>(self: Option<A>, that: Option<B>): Option<[A, B]> =>
1311 isSome(self) && isSome(that) ? some([self.value, that.value]) : none()
1312
1313/**
1314 * Combines an `Option` with a collection of `Option`s into a single `Option`

Callers 3

Option.tsFile · 0.70
Option.test.tsFile · 0.50
Predicate.test.tsFile · 0.50

Calls 3

isSomeFunction · 0.85
noneFunction · 0.85
someFunction · 0.70

Tested by

no test coverage detected