MCPcopy Index your code
hub / github.com/Effect-TS/effect / getEquivalence

Function getEquivalence

packages/effect/src/Either.ts:313–321  ·  view source on GitHub ↗
({ left, right }: {
  right: Equivalence.Equivalence<A>
  left: Equivalence.Equivalence<E>
})

Source from the content-addressed store, hash-verified

311 * @since 2.0.0
312 */
313export const getEquivalence = <A, E>({ left, right }: {
314 right: Equivalence.Equivalence<A>
315 left: Equivalence.Equivalence<E>
316}): Equivalence.Equivalence<Either<A, E>> =>
317 Equivalence.make((x, y) =>
318 isLeft(x) ?
319 isLeft(y) && left(x.left, y.left) :
320 isRight(y) && right(x.right, y.right)
321 )
322
323/**
324 * @category mapping

Callers

nothing calls this directly

Calls 5

makeMethod · 0.65
isLeftFunction · 0.50
leftFunction · 0.50
isRightFunction · 0.50
rightFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…