← Back

Source

Free

type Free<F, A> = Pure<F, A> | Impure<F, A, any>

Added in v1.0.0 (data)

ap

<B>(fab: Free<F, (a: A) => B>): Free<F, B>

Added in v1.0.0 (method)

ap_

<B, C>(this: Free<F, (b: B) => C>, fb: Free<F, B>): Free<F, C>

Added in v1.0.0 (method)

Flipped version of ap

chain

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

Added in v1.0.0 (method)

inspect

(): string

Added in v1.0.0 (method)

isImpure

(): this is Impure<F, A, any>

Added in v1.0.0 (method)

isPure

(): this is Pure<F, A>

Added in v1.0.0 (method)

map

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

Added in v1.0.0 (method)

toString

(): string

Added in v1.0.0 (method)

foldFree

foldFree<M>(M: Monad<M>): <F, A>(nt: any, fa: Free<F, A>) => HKT<M, A>

Added in v1.0.0 (function)

hoistFree

hoistFree<F, G>(nt: <A>(fa: HKT<F, A>) => HKT<G, A>): (<A>(fa: Free<F, A>) => Free<G, A>)

Added in v1.0.0 (function)

Use a natural transformation to change the generating type constructor of a free monad

liftF

<F, A>(fa: HKT<F, A>): Free<F, A>

Added in v1.0.0 (function)

Lift an impure value described by the generating type constructor F into the free monad

of

<F, A>(a: A): Free<F, A>

Added in v1.0.0 (function)