package travesty
Monadically traversable containers
Install
Dune Dependency
Authors
Maintainers
Sources
travesty-v0.5.1.tbz
sha256=6096bfedbab2044c6372c918712bc5e71ffba5a373cdab37398787712c9c83af
sha512=a7a1cd7981af2c16111323cdf72ac6a45a5e58a3701376fdb3d7f3ee15fbf4003e71f94ad882ccea0d308bb229f3ac0b2c9861a231a498c22e44551f1fcf802d
doc/travesty.containers/Travesty_containers/Zipper/Plain/On_error/index.html
Module Plain.On_error
Source
On_error
is On_monad
specialised to the error monad.
Source
val pop_m :
'a t ->
on_empty:('a t -> ('a * 'a t) Base.Or_error.t) ->
('a * 'a t) Base.Or_error.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.
Source
val peek_m :
?steps:Base.int ->
'a t ->
on_empty:('a t -> 'a Base.Or_error.t) ->
'a Base.Or_error.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.
Source
val step_m :
?steps:Base.int ->
'a t ->
on_empty:('a t -> 'a t Base.Or_error.t) ->
'a t Base.Or_error.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.
Source
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.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.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>