Table of contents


Traced (interface)

Signature

export interface Traced<P, A> {
  (p: P): A
}

Added in v2.0.0

URI (type alias)

Signature

export type URI = typeof URI

Added in v2.0.0

URI (constant)

Signature

export const URI: "Traced" = ...

Added in v2.0.0

traced (constant)

Signature

export const traced: Functor2<URI> = ...

Added in v2.0.0

censor (function)

Apply a function to the current position

Signature

export function censor<P>(f: (p: P) => P): <A>(wa: Traced<P, A>) => Traced<P, A> { ... }

Added in v2.0.0

getComonad (function)

Signature

export function getComonad<P>(monoid: Monoid<P>): Comonad2C<URI, P> { ... }

Added in v2.0.0

listen (function)

Get the current position

Signature

export function listen<P, A>(wa: Traced<P, A>): Traced<P, [A, P]> { ... }

Added in v2.0.0

listens (function)

Get a value which depends on the current position

Signature

export function listens<P, B>(f: (p: P) => B): <A>(wa: Traced<P, A>) => Traced<P, [A, B]> { ... }

Added in v2.0.0

tracks (function)

Extracts a value at a relative position which depends on the current value.

Signature

export function tracks<P, A>(M: Monoid<P>, f: (a: A) => P): (wa: Traced<P, A>) => A { ... }

Added in v2.0.0

map (export)

Signature

<A, B>(f: (a: A) => B) => <E>(fa: Traced<E, A>) => Traced<E, B>

Added in v2.0.0