F
>
x
>
G
The execution of F
>
x
>
G
starts by executing F
. Whenever F
publishes a value, a new execution of G
begins in parallel with F
(and with any previous
executions of G
); in that execution of G
, variable x
is bound to the value
published by F
. Any value
published by any executions of G
is published by the whole expression, but the values published
by F
are not published by the whole expression; they are consumed by the variable binding.
F
>
P
>
G
The sequential combinator may be written as F
>
P
>
G
,
where P
is a pattern instead of
just a variable name. Any value published by F
is matched against the pattern P
.
If this match is successful, a new execution of G
begins, with all of the bindings
from the match. Otherwise, the published value is simply ignored, and no new execution
of G
is begun.
F
>>
G
This is equivalent to using a wildcard pattern: F
>_>
G
. Every publication
of F
will match the combinator pattern, causing an execution of G
for every individual
publication of F
. No bindings will be made in G
from these publications.
|
Combinator Precedence Level: sequential > parallel > pruning > otherwise [Full Table]
The type of F
>
P
>
G
is the type of G
in the context ΓF,
where ΓF is the result of matching the pattern P
against the type of F
.
Related Reference Topics
Related Tutorial Sections