Bonsai_proc.Valuetype 'a t = 'a Cont.tA value of type 'a Value.t represents a value that may change during the lifetime of the program. For those familiar with the Incremental library, this type is conceptually very similar to Incr.t. The main method by which you acquire values of type Value.t is by using the let%sub syntax extension.
val c : int Computation.t
let%sub x = c in
(* [x] has type [int Value.t] here *)In the example above, we run a computation c and store the result of that computation in x which has type Value.t.
Value.t is an applicative, which means that you can combine multiple Values into one by using Let_syntax:
val a : int Value.t
val b : int Value.t
let open Let_syntax in
let%map a = a and b = b in
a + binclude Bonsai_private_base.Applicative.S with type 'a t := 'a tval return : here:lexing_position -> 'a -> 'a tmodule Applicative_infix : sig ... endA Value.t transformed by cutoff will only trigger changes on its dependents when the equality of the contained value has changed.
Immediate nesting of cutoff nodes are combined into a single cutoff node whose equality function is true when any of the composed nodes is true and is false when all of the composed nodes are false. They're "or'ed together".