Options
All
  • Public
  • Public/Protected
  • All
Menu

standard-data-structures

Index

Functions

Const id

  • id<A>(A: A): A
  • ID function that takes in a value and returns the same value as output.

    Type parameters

    • A

    Parameters

    • A: A

    Returns A

Const pipe

  • pipe<T>(...T: T): PipelineN<T>
  • Takes in any number of values that can be piped into a function. Returns a pipeline that can be used recursively to pipe to other functions.

    Example:

    import {pipe} from 'standard-data-structures'
    
    pipe(1, 2).into((A, B) => A + B).into(A => [A, A * A]).drain // [3, 9]

    Type parameters

    • T: unknown[]

    Parameters

    • Rest ...T: T

    Returns PipelineN<T>

Generated using TypeDoc