Ordering overview

Utilities to accommodate fp-ts/Ordering.

Added in v0.12.0


Table of contents


3 Functions

EQ

Alias for the notion of “equal to” in Ordering.

Signature

export declare const EQ: Ordering
EQ :: Ordering

Example

import { Ord } from 'fp-ts/number'
import { EQ } from 'fp-ts-std/Ordering'

assert.strictEqual(Ord.compare(0, 0), EQ)

Added in v0.12.0

GT

Alias for the notion of “greater than” in Ordering.

Signature

export declare const GT: Ordering
GT :: Ordering

Example

import { Ord } from 'fp-ts/number'
import { GT } from 'fp-ts-std/Ordering'

assert.strictEqual(Ord.compare(1, 0), GT)

Added in v0.12.0

LT

Alias for the notion of “less than” in Ordering.

Signature

export declare const LT: Ordering
LT :: Ordering

Example

import { Ord } from 'fp-ts/number'
import { LT } from 'fp-ts-std/Ordering'

assert.strictEqual(Ord.compare(0, 1), LT)

Added in v0.12.0