UNPKG

@effect-ts/system

Version:

Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.

34 lines (29 loc) 408 B
/** * `number` => `Ordering` */ export function sign(n) { if (n < 0) { return -1; } if (n > 0) { return 1; } return 0; } /** * Invert Ordering */ export function invert(O) { switch (O) { case -1: return 1; case 1: return -1; default: return 0; } } export function combine(x, y) { return x !== 0 ? x : y; } //# sourceMappingURL=operations.mjs.map