Skip to main content
Module

x/rimbu/mod.ts>Comp.numberComp

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Comp.numberComp
import { Comp } from "https://deno.land/x/rimbu@0.14.0/mod.ts";
const { numberComp } = Comp;

Returns a default number Comp instance that orders numbers naturally.

Examples

Example 1

const c = Comp.numberComp();
console.log(c.compare(3, 5))
// => -2

Returns

Comp<number>