Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/comparable.ts>fromCompare

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

Create a Comparable from a Compare function.

Examples

Example 1

import { fromCompare } from "./comparable.ts";
import { pipe } from "./fn.ts";

const { compare } = fromCompare<number>(
  (second) => (first) => first === second
);

const result = compare(1)(1); // true

Parameters

optional
compare: Compare<A> = [UNSUPPORTED]