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

Function Array_

packages/effect/src/Order.ts:549–562  ·  view source on GitHub ↗

* @since 4.0.0

(O: Order<A>)

Source from the content-addressed store, hash-verified

547 * @since 4.0.0
548 */
549function Array_<A>(O: Order<A>): Order<ReadonlyArray<A>> {
550 return make((self, that) => {
551 const aLen = self.length
552 const bLen = that.length
553 const len = Math.min(aLen, bLen)
554 for (let i = 0; i < len; i++) {
555 const o = O(self[i], that[i])
556 if (o !== 0) {
557 return o
558 }
559 }
560 return Number(aLen, bLen)
561 })
562}
563
564export {
565 /**

Callers

nothing calls this directly

Calls 2

makeFunction · 0.70
NumberFunction · 0.70

Tested by

no test coverage detected