@prelude/cmp
Version:
Cmp module.
13 lines • 509 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const prelude_js_1 = require("./prelude.js");
/** @returns composed non-nullable comparision function as null-handling function, `null` values are considered lower than non-`null` values. */
const nullOr = (cmp) => (a, b) => a === null ?
b === null ?
prelude_js_1.eq :
prelude_js_1.asc :
b === null ?
prelude_js_1.dsc :
cmp(a, b);
exports.default = nullOr;
//# sourceMappingURL=null-or.js.map
;