Skip to content

Latest commit

 

History

History
185 lines (114 loc) · 1.8 KB

function.md

File metadata and controls

185 lines (114 loc) · 1.8 KB

MODULE function

and

function

<A>(p1: Predicate<A>, p2: Predicate<A>): Predicate<A>

apply

function

<A, B>(f: (a: A) => B) => (a: A): B

Applies a function to an argument ($)

applyFlipped

function

<A>(a: A) => <B>(f: (a: A) => B): B

Applies an argument to a function (#)

compose

function

compose(...fns: Array<Function>): Function

concat

function

<A>(x: Array<A>, y: Array<A>): Array<A>

constFalse

function

(): boolean

A thunk that returns always false

constNull

function

(): null

A thunk that returns always null

constTrue

function

(): boolean

A thunk that returns always true

constUndefined

function

(): undefined

A thunk that returns always undefined

constant

function

<A>(a: A): Lazy<A>

curry

function

curry(f: Function)

flip

function

<A, B, C>(f: Curried2<A, B, C>): Curried2<B, A, C>

Flips the order of the arguments to a function of two arguments.

identity

function

<A>(a: A): A

not

function

<A>(predicate: Predicate<A>): Predicate<A>

on

function

<B, C>(op: BinaryOperation<B, C>) => <A>(f: (a: A) => B): BinaryOperation<A, C>

The on function is used to change the domain of a binary operator.

or

function

or<A>(p1: Predicate<A>, p2: Predicate<A>): Predicate<A>

pipe

function

pipe(...fns: Array<Function>): Function

toString

function

(x: any): string

tuple

function

<A, B>(a: A, b: B): [A, B]

tupleCurried

function

<A>(a: A) => <B>(b: B): [A, B]

unsafeCoerce

function

;<A, B>(a: A): B => a as any