type 'a data = 'a M.t
Raw (non-reactive) version of the data container
type 'a msg =
val empty : 'a t
Empty data structure
Build a container from initial contents. The handle can be used for performing reactive updates.
from_event d e is a container whose initial value is
d, and which gets updated for every occurrence of
Convert a React signal into a ReactiveData container.
Whenever the signal changes from value
v to value
v', we detect the differences between
v', and perform downstream computation (e.g., for
map) only on the new and modified elements.
set h d sets the contents of the container corresponding to
h, disregarding previous contents
map f c applies
f on all elements of
c, producing a new reactive container
c'. Modifying the contents of
c leads to modifications of
f is applied only on the new or modified elements of
fold f c v accumulates the updates on
f starting from
The result is a signal of value
f m_n (f ... (f m_1 v)), where
m_n are the messages that have been applied since the beginning of
m_1 is a pseudo-message
Set l, accounting for the contents
c at the time when accumulation starts.