Skip to main content
Module

x/fun/sortable.ts>lte

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

Construct a curried less than or equal to function over A from Sortable.

Examples

Example 1

import * as O from "./sortable.ts";
import { SortableNumber } from "./number.ts";
import { pipe } from "./fn.ts";

const lte = O.lte(SortableNumber);

const result1 = pipe(1, lte(2)); // true
const result2 = pipe(2, lte(1)); // false
const result3 = pipe(1, lte(1)); // true

Parameters

unnamed 0: Sortable<A>

Returns

(snd: A) => (fst: A) => boolean