Skip to main content
Module

x/fun/comparable.ts>undefinable

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function undefinable
import { undefinable } from "https://deno.land/x/fun@v2.0.0/comparable.ts";

Creates a derivative Comparable that can also compare undefined values in addition to the source eq.

Examples

Example 1

import { undefinable, number } from "./comparable.ts";

const { compare } = undefinable(number);

const result1 = compare(1)(undefined); // false
const result2 = compare(undefined)(undefined); // true

Returns

Comparable<A | undefined>