package dolmen
Module to handle substitutions
val empty : ('a, 'b) t
The empty substitution
val is_empty : ('a, 'b) t -> bool
Test wether a substitution is empty
val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit
Iterates over the bindings of the substitution.
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
Fold over the elements
Merge two substitutions
val bindings : ('a, 'b) t -> ('a * 'b) list
Returns the list of bindings ofa substitution.
val exists : ('a -> 'b -> bool) -> ('a, 'b) t -> bool
Tests wether the predicate holds for at least one binding.
val for_all : ('a -> 'b -> bool) -> ('a, 'b) t -> bool
Tests wether the predicate holds for all bindings.
val hash : ('b -> int) -> ('a, 'b) t -> int
Comparison and hash functions, with a comparison/hash function on values as parameter
val print :
(Stdlib.Format.formatter -> 'a -> unit) ->
(Stdlib.Format.formatter -> 'b -> unit) ->
Stdlib.Format.formatter ->
('a, 'b) t ->
unit
Prints the substitution, using the given functions to print keys and values.
val debug :
(Stdlib.Format.formatter -> 'a -> unit) ->
(Stdlib.Format.formatter -> 'b -> unit) ->
Stdlib.Format.formatter ->
('a, 'b) t ->
unit
Prints the substitution, using the given functions to print keys and values, includign some debug info.
val choose : ('a, 'b) t -> 'a * 'b
Return one binding of the given substitution, or raise Not_found if the substitution is empty.
module type S = sig ... end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>