Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/sortable.ts>between

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

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

Returns

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