package travesty
Monadically traversable containers
Install
Dune Dependency
Authors
Maintainers
Sources
travesty-v0.6.2.tbz
sha256=be89ec1c96fedcc47362568b359aa6b8d3fefb8b86f70133dd1a75ca72476807
sha512=19616b0a5fddd5725fdf7ab160e9f89d243f0dbaaaf53ba455bfbac2790cb07811862ecc5ada81be35a06869a987dcc149f24a7e84f461222216d45fe0036ca2
doc/travesty.containers/Travesty_containers/Zipper/Plain/On_option/index.html
Module Plain.On_option
Source
On_option
is On_monad
specialised to the option monad.
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.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.
Source
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.
Source
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)"
>