package travesty

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Monadic contains a version of the builder interface that can interact with the inner monad (Inner) this state transformer is overlaying.

include State_transform_types.Generic_types with type 'a state := state with type 'a final := 'a Inner.t with type ('a, 's) t := 'a t
val make : (state -> (state * 'a) Inner.t) -> 'a t

make creates a context-sensitive computation that can modify both the current context and the data passing through.

Specialised builders

val peek : (state -> 'a Inner.t) -> 'a t

peek creates a context-sensitive computation that can look at the current context, but not modify it.

val modify : (state -> state Inner.t) -> Base.unit t

modify creates a context-sensitive computation that can look at and modify the current context.

val return : 'a Inner.t -> 'a t

return lifts a value or monad into a stateful computation.

OCaml

Innovation. Community. Security.