travesty

Traversable containers, monad extensions, and more
IN THIS PACKAGE
include State_transform_types.Generic_types with type 'a state := 'a with type 'a final := 'a Inner.t with type ('a, 's) t := ( 'a, 's ) t
val make : ( 's -> ('s * 'a) Inner.t ) -> ( 'a, 's ) t

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

Specialised builders

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

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

val modify : ( 's -> 's Inner.t ) -> ( Base.unit, 's ) t

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

val return : 'a Inner.t -> ( 'a, 's ) t

return lifts a value or monad into a stateful computation.