Plain.On_monadSourceOn_monad provides various zipper operations parametrised by a monad.
module M : Base.Monad.Spop_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.
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.
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.