Skip to main content
Module

x/fun/comparable.ts>literal

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

Creates a Comparable that compares a union of literals using strict equality.

Examples

Example 1

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

const { compare } = literal(1, 2, "Three");

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