traitExpr[S <: Sys[S], +A] extends Obj[S] with Publisher[S, Change[A]]
An expression is a computation that reduces to a single value of type A.
Expressions can be understood as dataflow variables. When a tree is
composed, a change in the root of the tree propagates through to the leaves
in the form of an emitted Change event that carries the old and new
value (according to the particular node of the tree).
Basic expression types are Expr.Const - it simply wraps a constant value
and thus will never change or fire an event - and Expr.Var which can be
thought of as a mutable variable carrying a peer expression. When the variable
assignment changes, the expression currently held is evaluated and propagated
as an event. Intermediate nodes or expressions might modify the value, such
as a binary operator (e.g., an integer expression that sums two input
integer expressions).
An expression is a computation that reduces to a single value of type
A
. Expressions can be understood as dataflow variables. When a tree is composed, a change in the root of the tree propagates through to the leaves in the form of an emittedChange
event that carries the old and new value (according to the particular node of the tree).Basic expression types are
Expr.Const
- it simply wraps a constant value and thus will never change or fire an event - andExpr.Var
which can be thought of as a mutable variable carrying a peer expression. When the variable assignment changes, the expression currently held is evaluated and propagated as an event. Intermediate nodes or expressions might modify the value, such as a binary operator (e.g., an integer expression that sums two input integer expressions).