preface

An opinionated library for function programming (à La Haskell)
IN THIS PACKAGE

Parameters

Signature

type tape = Tape.t

The parameter which is a monoid.

type 'a comonad = 'a C.t

The inner comonad.

type 'a t = ( tape -> 'a ) comonad

The type held by the traced comonad.

val lower : 'a t -> 'a comonad

get the underlying comonad.

val run : 'a t -> ( tape -> 'a ) comonad

Unwrap the traced computation.

val trace : tape -> 'a t -> 'a

Extracts the value at the current position.

val traces : ( 'a -> tape ) -> 'a t -> 'a

Extracts the value at a relative position.

val listen : 'a t -> ('a * tape) t

Get the current position.

val listens : ( tape -> 'b ) -> 'a t -> ('a * 'b) t

Get the current position relatively.

val censor : ( tape -> tape ) -> 'a t -> 'a t

Apply a function to the current position.