package lwd
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Module Lwd_utilsSource
A monoid, defined by a default element and an associative operation
List reduction functions
All reductions are balanced, relying on operator associativity.
fold_left would compute a chain like: fold f [a; b; c; d] = f a (f b (f c d)
reduce uses tree-shaped computations like: reduce f [a; b; c; d] = f (f a b) (f c d)
The depth of the computation grows in O(log n) where n is the length of the input sequence.
Map and reduce a list with a monoid *
Other Lwd list functions
Miscellaneous functions
I don't know where to put these, but they are useful, especially for UI-related computations.
Minimum of two integers
Maximum of two integers
Clamp an integer between two bounds.
Minimum of two floats
Maximum of two floats
Clamp a float between two bounds.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page