Module Bonsai_proc.Incr

val value_cutoff : here:lexing_position -> 'a Value.t -> equal:('a -> 'a -> bool) -> 'a Computation.t

A Value.t passed through value_cutoff will only trigger changes on its dependents when the value changes according to the provided equality function

val compute : here:lexing_position -> 'a Value.t -> f: ('a Bonsai_private_base.Import.Incr.t -> 'b Bonsai_private_base.Import.Incr.t) -> 'b Computation.t

Use compute to move a function from the incremental world into the bonsai world.

val to_value : here:lexing_position -> 'a Bonsai_private_base.Import.Incr.t -> 'a Value.t

If you've got an incremental, you can convert it to a value with this function.

Compute some incremental value based on the time source. Using this time source instead of Incr.clock is the more testable approach, since it allows tests to control how time moves forward.