Plain.On_errorSourceOn_error is On_monad specialised to the error monad.
val pop_m :
'a t ->
on_empty:('a t -> ('a * 'a t) Base.Or_error.t) ->
('a * 'a t) Base.Or_error.tpop_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.
val peek_m :
?steps:Base.int ->
'a t ->
on_empty:('a t -> 'a Base.Or_error.t) ->
'a Base.Or_error.tpeek_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.
val step_m :
?steps:Base.int ->
'a t ->
on_empty:('a t -> 'a t Base.Or_error.t) ->
'a t Base.Or_error.tstep_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.
val map_m_head :
'a t ->
f:('a -> 'a Base.option Base.Or_error.t) ->
on_empty:('a t -> 'a t Base.Or_error.t) ->
'a t Base.Or_error.tmap_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.