Signal with a constant value.
Signal containing a mutable value.
Value can be accessed with the apply method.
To modify the content, clients must use the mutate method on event streams.
A signal that is the aggregation of the values of other signals.
At any point during execution this signal will contain
an event obtained by applying op on the values of all
the events in signals.
This signal aggregate is called a static aggregate
since the signals set is specified during aggregate
creation and cannot be changed afterwards.
The signal aggregate creates an aggregation tree data structure,
so a value update in one of the signals requires only O(log n)
steps to update the value of the aggregate signal.
val emitters = for (0 until 10) yield new Events.Emitter[Int]
val ag = Signal.aggregate(emitters)(_ + _)
The aggregation operator needs to be associative, but does not need to be
For example, string concatenation for signals of strings or addition for integer
signals are valid operators. Subtraction for integer signals, for example, is not
associative and not allowed.
The value z for the aggregation does not need to be a neutral element with
respect to the aggregation operation.
The resulting signal is hot, i.e. its value is updated even if there are no
type of the aggregate signal
signals for the aggregation
the zero value of the aggregation, used if the list is empty
the aggregation operator, must be associative