Skip to main content Link Search Menu Expand Document (external link)

Bounded overview

Added in v1.0.0


Table of contents


constructors

max

Monoid that returns last maximum of elements.

Signature

export declare const max: <A>(B: Bounded<A>) => Monoid<A>

Added in v1.0.0

min

Monoid that returns last minimum of elements.

Signature

export declare const min: <A>(B: Bounded<A>) => Monoid<A>

Added in v1.0.0

instances

number

Signature

export declare const number: Bounded<number>

Added in v1.0.0

type class

Bounded (interface)

Signature

export interface Bounded<A> extends Order<A> {
  readonly maxBound: A
  readonly minBound: A
}

Added in v1.0.0

type lambdas

BoundedTypeLambda (interface)

Signature

export interface BoundedTypeLambda extends TypeLambda {
  readonly type: Bounded<this['Target']>
}

Added in v1.0.0

utils

clamp

Clamp a value between minBound and maxBound values.

Signature

export declare const clamp: <A>(B: Bounded<A>) => (a: A) => A

Added in v1.0.0

reverse

Reverses the Order of a Bounded and flips maxBound and minBound values.

Signature

export declare const reverse: <A>(B: Bounded<A>) => Bounded<A>

Added in v1.0.0