import { comparable } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { nullable } = comparable;
Creates a derivative Comparable that can also compare null values in addition to the source eq.
Examples
Example 1
Example 1
import { nullable, number } from "./comparable.ts";
const { compare } = nullable(number);
const result1 = compare(1)(null); // false
const result2 = compare(null)(null); // true
Parameters
unnamed 0: Comparable<A>
Returns
Comparable<A | null>