Module Edge.Poll

module Starting : sig ... end
val effect_on_change : here:lexing_position -> ?sexp_of_input:('a -> Core.Sexp.t) -> ?sexp_of_result:('o -> Core.Sexp.t) -> equal_input:('a -> 'a -> bool) -> ?equal_result:('o -> 'o -> bool) -> ('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 : here:lexing_position -> ?sexp_of_model:('o -> Core.Sexp.t) -> ?equal:('o -> 'o -> bool) -> ('o, 'r) Starting.t -> effect:'o Effect.t Value.t -> ('r * unit Effect.t) Computation.t