quarp v1.2.0 Reactivity.DSL.Signal View Source
Link to this section Summary
Functions
Delays each produced item by the given interval.
Applies a procedure to the values of a signal without changing them. Generally used for side effects.
Returns the current value of the Signal.
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.
Gets the node where the signal with the given name is hosted.
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 v
to the console.
Inspects the given signal by printing its output messages {v, c}
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.
Gets the names, types and hosts of all the available signals.
Transforms a signal into a plain observable, stripping all messages from their contexts.
Transforms a signal into a signal observable, that is: an observable with output of the format {v, c}. Thus, the messages of the signal are fully kept, no context is stripped.
Unregisters a signal from the registry by its name.
Link to this section Functions
delay(signal, interval) View Source
Delays each produced item by the given interval.
each(signal, proc) View Source
Applies a procedure to the values of a signal without changing them. Generally used for side effects.
evaluate(signal) View Source
Returns the current value of the Signal.
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.
host(name) View Source
Gets the node where the signal with the given name is hosted.
liftapp(signal, 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(signal) View Source
Inspects the given signal by printing its output values v
to the console.
print_message(signal) View Source
Inspects the given signal by printing its output messages {v, c}
to the console.
register(signal, name) View Source
Publishes a signal by registering it in the registry.
scan(signal, 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.
signals() View Source
Gets the names, types and hosts of all the available signals.
to_plain_obs(signal) View Source
Transforms a signal into a plain observable, stripping all messages from their contexts.
to_signal_obs(signal) View Source
Transforms a signal into a signal observable, that is: an observable with output of the format {v, c}. Thus, the messages of the signal are fully kept, no context is stripped.
unregister(name) View Source
Unregisters a signal from the registry by its name.