package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Starting : sig ... end
val effect_on_change : (module Model with type t = 'a) -> (module Model with type t = 'o) -> ('o, 'r) Starting.t -> 'a Value.t -> effect:('a -> 'o Effect.t) Value.t -> 'r Computation.t

This function runs an effect every time that the input value changes, returning the most recent result as its computation.

The Starting.t argument controls the type of the result, and depending on the value, will either return an optional value Option.None or a default value 'o in the time in between the computation starting and the first result coming back from the effect.

val manual_refresh : (module Model with type t = 'o) -> ('o, 'r) Starting.t -> effect:'o Effect.t Value.t -> ('r * unit Effect.t) Computation.t
OCaml

Innovation. Community. Security.