A signal can be used to decouple the (unique) emitter of some event, and (multiple) receivers for this event. The signal is typically created by the emitter (in the same module), and exposed; then, observers can register to the signal and be notified every time an event (a value) is emitted through the signal.
val create : unit -> 'a t
val send : 'a t -> 'a -> unit
Trigger the signal
Register a handler to the signal; the handler returns
true if it wants to continue being notified,
val on_every : 'a t -> ( 'a -> _ ) -> unit
on_every s f calls
f on every event signalled on
val once : 'a t -> ( 'a -> 'b ) -> unit
Register a handler to be called only once
propagate a b propagates all values of
b. Cycles are not detected.