MCPcopy Create free account
hub / github.com/Effect-TS/effect / product

Function product

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

Source from the content-addressed store, hash-verified

1529 * @since 2.0.0
1530 */
1531export const product = <A, B>(self: Option<A>, that: Option<B>): Option<[A, B]> =>
1532 isSome(self) && isSome(that) ? some([self.value, that.value]) : none()
1533
1534/**
1535 * Combines a primary `Option` with an iterable of `Option`s into a tuple if

Callers 2

Option.test.tsFile · 0.85
Option.tsFile · 0.85

Calls 3

isSomeFunction · 0.85
someFunction · 0.70
noneFunction · 0.70

Tested by

no test coverage detected