import { Comp } from "https://deno.land/x/rimbu@1.0.4/common/internal.ts";
const { withUndefined } = Comp;
Returns a Comp instance that extends the given comp
instance with the capability to handle undefined
values, where undefined is considered to be smaller
than any other value, and equal to another undefined.
Examples
Example 1
Example 1
const c = Comp.withUndefined(Comp.numberComp())
console.log(c.compare(undefined, 5) < 0)
// => true
console.log(c.compare(undefined, undefined))
// => 0