Link Search Menu Expand Document

number overview

Added in v2.10.0


Table of contents


instances

Bounded

Signature

export declare const Bounded: B.Bounded<number>

Added in v2.10.0

Eq

Signature

export declare const Eq: E.Eq<number>

Added in v2.10.0

Field

Signature

export declare const Field: F.Field<number>

Added in v2.10.0

MonoidProduct

number monoid under multiplication.

The empty value is 1.

Signature

export declare const MonoidProduct: Monoid<number>

Example

import { MonoidProduct } from 'fp-ts/number'

assert.deepStrictEqual(MonoidProduct.concat(2, MonoidProduct.empty), 2)

Added in v2.10.0

MonoidSum

number monoid under addition.

The empty value is 0.

Signature

export declare const MonoidSum: Monoid<number>

Example

import { MonoidSum } from 'fp-ts/number'

assert.deepStrictEqual(MonoidSum.concat(2, MonoidSum.empty), 2)

Added in v2.10.0

Ord

Signature

export declare const Ord: O.Ord<number>

Added in v2.10.0

SemigroupProduct

number semigroup under multiplication.

Signature

export declare const SemigroupProduct: Semigroup<number>

Example

import { SemigroupProduct } from 'fp-ts/number'

assert.deepStrictEqual(SemigroupProduct.concat(2, 3), 6)

Added in v2.10.0

SemigroupSum

number semigroup under addition.

Signature

export declare const SemigroupSum: Semigroup<number>

Example

import { SemigroupSum } from 'fp-ts/number'

assert.deepStrictEqual(SemigroupSum.concat(2, 3), 5)

Added in v2.10.0

Show

Signature

export declare const Show: S.Show<number>

Added in v2.10.0