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

Function Array_

packages/effect/src/Equivalence.ts:560–570  ·  view source on GitHub ↗

* @since 4.0.0

(item: Equivalence<A>)

Source from the content-addressed store, hash-verified

558 * @since 4.0.0
559 */
560function Array_<A>(item: Equivalence<A>): Equivalence<ReadonlyArray<A>> {
561 return make((self, that) => {
562 if (self.length !== that.length) return false
563
564 for (let i = 0; i < self.length; i++) {
565 if (!item(self[i], that[i])) return false
566 }
567
568 return true
569 })
570}
571export {
572 /**
573 * Creates an equivalence for arrays where all elements are compared using the same equivalence.

Callers

nothing calls this directly

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected