Skip to main content
Module

x/fun/mod.ts>sortable.between

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

Construct an exclusive between function over A from Sortable.

Examples

Example 1

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

const between = O.between(SortableNumber);
const between1 = between(0, 10)

const result1 = between1(-1); // false
const result2 = between1(1); // true
const result3 = between1(100); // false

Parameters

sort: Sortable<A>

Returns

(low: A, high: A) => (value: A) => boolean