package bonsai
Module Edge.PollSource
Source
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.tThis 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.
Source
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