quarp v0.3.8 Reactivity.DSL.Signal View Source
Link to this section Summary
Functions
Applies a procedure to the values of a signal without changing them. Generally used for side effects.
Creates a signal from a plain observable, operating under the globally set consistency guarantee.
Creates a signal from a signal observable, that is: an observable with output of the format {v, c}. This is used to create signals for guarantees with non-obvious context content that can be manually attached using the plain observable interface.
Lifts and applies a primitive function to one or more signals Values of the input signals are produced into output using this function depending on the consistency guarantees of the signals
Inspects the given signal by printing its output values to the console.
Publishes a signal by registering it in the registry.
Applies a given procedure to a signal's value and its previous result. Works in the same way as the Enum.scan function
Gets a signal from the registry by its name.
Transforms a signal into a plain observable.
Unregisters a signal from the registry by its name.
Link to this section Functions
each(arg, proc) View Source
Applies a procedure to the values of a signal without changing them. Generally used for side effects.
from_plain_obs(obs) View Source
Creates a signal from a plain observable, operating under the globally set consistency guarantee.
from_signal_obs(sobs) View Source
Creates a signal from a signal observable, that is: an observable with output of the format {v, c}. This is used to create signals for guarantees with non-obvious context content that can be manually attached using the plain observable interface.
liftapp(signals, func) View Source
Lifts and applies a primitive function to one or more signals Values of the input signals are produced into output using this function depending on the consistency guarantees of the signals
print(arg) View Source
Inspects the given signal by printing its output values to the console.
register(signal, name) View Source
Publishes a signal by registering it in the registry.
scan(arg, func, default \\ nil) View Source
Applies a given procedure to a signal's value and its previous result. Works in the same way as the Enum.scan function:
Enum.scan(1..10, fn(x,y) -> x + y end) => [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
signal(name) View Source
Gets a signal from the registry by its name.
to_plain_obs(arg) View Source
Transforms a signal into a plain observable.
unregister(name) View Source
Unregisters a signal from the registry by its name.