283
edits
KalmanKeri (talk | contribs) m (→Alternatives) |
KalmanKeri (talk | contribs) |
||
| Line 95: | Line 95: | ||
* <math>\mathsf{pass}</math> is a passive process that endlessly copies its input to its output. | * <math>\mathsf{pass}</math> is a passive process that endlessly copies its input to its output. | ||
=== | === Alternative composition === | ||
captures failure | captures failure | ||
| Line 104: | Line 104: | ||
there is a default case | there is a default case | ||
=== Exclusive choice === | |||
One can make choices mutually exclusive by limiting themeselves to trees of alternatives where each leaf of the tree is one of the forms <math>a^+ . s</math> and <math>a^- . s</math> [and all atoms are different]. This is an example of guarded choice[]. It allows for the encoding of the sum type and the corresponding <math>case</math> expressions in strongly typed functional languages. | One can make choices mutually exclusive by limiting themeselves to trees of alternatives where each leaf of the tree is one of the forms <math>a^+ . s</math> and <math>a^- . s</math> [and all atoms are different]. This is an example of guarded choice[]. It allows for the encoding of the sum type and the corresponding <math>case</math> expressions in strongly typed functional languages. | ||
Example: list of booleans | |||
=== The pipe combinator === | === The pipe combinator === | ||
edits