Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Functional"

Index

Interfaces

Type aliases

Variables

Functions

Type aliases

Empty

Empty: A & object

Nil

Nil: null | undefined

Variables

Const emptySymbol

emptySymbol: unique symbol = Symbol('MONADISM:EMPTY')

Cast a Symbol as an empty value, to represent emptiness without undefined.

Functions

Const compose

  • compose<R>(fn1: function, ...fns: function[]): function
  • A classic functional compose.

    Type parameters

    • R

    Parameters

    • fn1: function
        • (a: R): R
        • Parameters

          • a: R

          Returns R

    • Rest ...fns: function[]

    Returns function

      • (a: R): R
      • Parameters

        • a: R

        Returns R

Const empty

  • empty<A>(): A & object

eq

  • eq<A>(a: A, b: A): boolean
  • eq<A>(a: A[], b: A[]): boolean
  • Utils

    Type parameters

    • A

    Parameters

    • a: A
    • b: A

    Returns boolean

  • Type parameters

    • A

    Parameters

    • a: A[]
    • b: A[]

    Returns boolean

Const exists

  • exists<T>(t: T): boolean
  • Ensure a value is not null or undefined.

    Type parameters

    • T

    Parameters

    • t: T

    Returns boolean

Const identity

  • identity<A>(a: A): A

Generated using TypeDoc