package travesty
Monadically traversable containers
Install
dune-project
Dependency
Authors
Maintainers
Sources
travesty-v0.6.0.tbz
sha256=64b136dadb5d7628dbdf5db18d4cae813a69f670979b028e5ce36db41c714064
sha512=086dbe8603047b549a0b97d9e8c3252ba71db0bd30bcb03eed24a86ad39ea52ee8118a29003bd20aea06d52b39e930e263d9a53215bfa58ea4bab7f856928add
doc/travesty.containers/Travesty_containers/Zipper/Plain/On_option/index.html
Module Plain.On_option
On_option
is On_monad
specialised to the option monad.
val pop_m :
'a t ->
on_empty:('a t -> ('a * 'a t) Base.Option.t) ->
('a * 'a t) Base.Option.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.
val peek_m :
?steps:Base.int ->
'a t ->
on_empty:('a t -> 'a Base.Option.t) ->
'a Base.Option.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.
val step_m :
?steps:Base.int ->
'a t ->
on_empty:('a t -> 'a t Base.Option.t) ->
'a t Base.Option.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.
val map_m_head :
'a t ->
f:('a -> 'a Base.option Base.Option.t) ->
on_empty:('a t -> 'a t Base.Option.t) ->
'a t Base.Option.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)"
>