clamp
import { clamp } from "https://raw.githubusercontent.com/baetheus/fun/main/sortable.ts";
Construct an inclusive clamp function over A from Sortable.
@example
import * as O from "./sortable.ts";
import { SortableNumber } from "./number.ts";
const clamp = O.clamp(SortableNumber);
const clamp1 = clamp(0, 10)
const result1 = clamp1(-1); // 0
const result2 = clamp1(1); // 1
const result3 = clamp1(100); // 10