Module Make.With_incr
val of_incr : 'result Incr.t -> (_, 'result) t
Constructs a bonsai component whose result is always the same as its input Incremental node.
val pure : f:('input Incr.t -> 'result Incr.t) -> ('input, 'result) t
Same as
Bonsai.pure
but allows the user to optimize using Incremental.
val model_cutoff : ('input, 'result) t -> ('input, 'result) t
Creates a bonsai component where the given cutoff is applied to the incremental node for the component's model, preventing a component from being recalculated unnecessarily.
See
Incr.set_cutoff
.
val value_cutoff : cutoff:'input Incremental.Cutoff.t -> ('input, 'input) t
Creates a bonsai component where the given cutoff is applied to the incremental node as input passes through the component, preventing a component from being recalculated unnecessarily.
See
Incr.set_cutoff
.
val map : ('input, 'r1) t -> f:('r1 Incr.t -> 'r2 Incr.t) -> ('input, 'r2) t
Transforms the result of a component, exposing the incrementality for optimization purposes.
val map_input : ('i2, 'result) t -> f:('i1 Incr.t -> 'i2 Incr.t) -> ('i1, 'result) t
Transforms the input of a component, exposing the incrementality for optimization purposes. The signature of
f
is reversed from most other map functions.
module type S = sig ... end
type ('input, 'model, 'action, 'result) component_s
= (module S with type Action.t = 'action and type Input.t = 'input and type Model.t = 'model and type Result.t = 'result)
val of_module : ('input, 'model, 'action, 'result) component_s -> default_model:'model -> ('input, 'result) t