An Orc expression publishes a value when the expression produces a value to be used in the context enclosing the expression.
An extremely simple example of publication is a literal, for example the expression 1
, which publishes a single integer value.
Orc expressions may publish zero or more values during their execution.
The effect of publication depends on the context.
For example, each publication of F
in the sequential combinator expression F
>
x>
G
causes G
to be run with x
bound to the published value.
An expression that never publishes is said to be silent.
The following is the publication behavior of a few common forms of Orc expressions.
Site calls publish only zero or one value.
Function calls may publish any number of values.
A literal expression publishes exactly one value.
stop
never publishes.
A variable expression, when executed, publishes its value, if bound. If not, execution of the variable is blocked until it is bound.
Each of the Orc combinators has a unique publication behavior.
(1 | 2) >> stop {- OUTPUT: -}
1 {- OUTPUT: 1 -}
(1 | 2) >x> x + 30 {- OUTPUT:PERMUTABLE 31 32 -}
def metronome() = signal | Rwait(1000) >> metronome() metronome()
Related Reference Topics
Related Tutorial Sections