package bonsai
A library for building dynamic webapps, using Js_of_ocaml
Install
Dune Dependency
Authors
Maintainers
Sources
bonsai-v0.14.0.tar.gz
sha256=43f35d648644492d776bf2c7b86c8227e7793615b6a658432e95f8dccd3631f8
md5=b5e743dbfa64d0da5fd660f14cd0b549
doc/bonsai.web/Bonsai_web/Bonsai/Map/index.html
Module Bonsai.Map
module type Comparator = Bonsai_types.Comparator
type ('k, 'cmp) comparator = ('k, 'cmp) Bonsai_types.comparator
val assoc_input :
('key, 'cmp) comparator ->
('data, 'result) t ->
(('key, 'data, 'cmp) Base.Map.t, ('key, 'result, 'cmp) Base.Map.t) t
Transforms a component into a new component whose input and result are maps.
val associ_input :
('key, 'cmp) comparator ->
('key * 'data, 'result) t ->
(('key, 'data, 'cmp) Base.Map.t, ('key, 'result, 'cmp) Base.Map.t) t
Transforms a component into a new component whose input and result are maps. The input for the transformed component also receives its key as an input.
val associ_input_with_extra :
('key, 'cmp) comparator ->
('key * 'data * 'input, 'result) t ->
(('key, 'data, 'cmp) Base.Map.t * 'input, ('key, 'result, 'cmp) Base.Map.t) t
val merge :
('input, ('k, 'r1, 'cmp) Base.Map.t) t ->
('input, ('k, 'r2, 'cmp) Base.Map.t) t ->
f:
(key:'k ->
[ `Both of 'r1 * 'r2 | `Left of 'r1 | `Right of 'r2 ] ->
'result option) ->
('input, ('k, 'result, 'cmp) Base.Map.t) t
Given two components that produce maps, create a new component that produces a map that is merged according provided function f
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>