package travesty

  1. Overview
  2. Docs
Traversable containers, monad extensions, and more

Install

Dune Dependency

Authors

Maintainers

Sources

travesty-0.7.2.tbz
sha256=49d43ea0e9cef32d493fcc1561fc7480c55d9a2490700e487f4d5c3aff562d61
sha512=1cd77071adfb4583d0fcd27469b97bc64b7278761949aaaf415768aec14f6a1243e14575155c75033a5141a0320b4f56687381dc2bc56432a5ea63ea8613d968

doc/travesty.containers/Travesty_containers/Zipper/Plain/On_ident/index.html

Module Plain.On_identSource

On_ident is On_monad specialised to the identity monad.

Sourceval pop_m : 'a t -> on_empty:('a t -> ('a * 'a t) Base.Monad.Ident.t) -> ('a * 'a t) Base.Monad.Ident.t

pop_m zipper ~on_empty behaves like pop, but executes a custom monadic action on_empty, instead of returning an error, when the cursor is empty.

Sourceval peek_m : ?steps:Base.int -> 'a t -> on_empty:('a t -> 'a Base.Monad.Ident.t) -> 'a Base.Monad.Ident.t

peek_m ?steps zipper ~on_empty behaves like peek_opt, but executes a custom monadic action on_empty, instead of returning None, when the cursor is empty.

Sourceval step_m : ?steps:Base.int -> 'a t -> on_empty:('a t -> 'a t Base.Monad.Ident.t) -> 'a t Base.Monad.Ident.t

step_m ?steps zipper ~on_empty behaves like step, but executes a custom monadic action on_empty, instead of returning an error, when the cursor is empty.

Sourceval map_m_head : 'a t -> f:('a -> 'a Base.option Base.Monad.Ident.t) -> on_empty:('a t -> 'a t Base.Monad.Ident.t) -> 'a t Base.Monad.Ident.t

map_m_head ?steps zipper ~on_empty behaves like map_head, but executes a custom monadic action on_empty, instead of leaving the zipper unchanged, when the cursor is empty.

OCaml

Innovation. Community. Security.