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

Function make

packages/effect/src/Order.ts:116–120  ·  view source on GitHub ↗
(
  compare: (self: A, that: A) => -1 | 0 | 1
)

Source from the content-addressed store, hash-verified

114 * @since 2.0.0
115 */
116export function make<A>(
117 compare: (self: A, that: A) => -1 | 0 | 1
118): Order<A> {
119 return (self, that) => self === that ? 0 : compare(self, that)
120}
121
122/**
123 * Order instance for strings that compares them lexicographically using JavaScript's `<` operator.

Callers 7

Order.tsFile · 0.70
flipFunction · 0.70
alwaysEqualFunction · 0.70
combineAllFunction · 0.70
TupleFunction · 0.70
Array_Function · 0.70
StructFunction · 0.70

Calls 1

compareFunction · 0.70

Tested by

no test coverage detected