MCPcopy Create free account
hub / github.com/effect-app/libs / productMany

Function productMany

repos/effect/packages/effect/src/Option.ts:1672–1687  ·  view source on GitHub ↗
(
  self: Option<A>,
  collection: Iterable<Option<A>>
)

Source from the content-addressed store, hash-verified

1670 * import { Option } from "effect"
1671 *
1672 * Option.zipWith(
1673 * Option.some("John"),
1674 * Option.some(25),
1675 * (name, age) => ({ name: name.toUpperCase(), age })
1676 * ) // => Option.some({ name: "JOHN", age: 25 })
1677 * ```
1678 *
1679 * @see {@link product} to combine into a tuple instead
1680 * @see {@link lift2} to lift a binary function
1681 *
1682 * @category zipping
1683 * @since 2.0.0
1684 */
1685export const zipWith: {
1686 <B, A, C>(that: Option<B>, f: (a: A, b: B) => C): (self: Option<A>) => Option<C>
1687 <A, B, C>(self: Option<A>, that: Option<B>, f: (a: A, b: B) => C): Option<C>
1688} = dual(
1689 3,
1690 <A, B, C>(self: Option<A>, that: Option<B>, f: (a: A, b: B) => C): Option<C> =>

Callers 1

Option.test.tsFile · 0.85

Calls 4

isNoneFunction · 0.85
pushMethod · 0.80
noneFunction · 0.70
someFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…