Skip to main content
Module

x/fun/mod.ts>comparable.unknown

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

A Comparable that can compare any unknown values (and thus can compare any values). Underneath it uses strict equality for the comparison.

Examples

Example 1

import { unknown } from "./comparable.ts";

const result1 = unknown.compare(1)("Hello"); // false
const result2 = unknown.compare(1)(1); // true