Pipe-calculus: Difference between revisions

Line 97: Line 97:
=== Alternatives ===
=== Alternatives ===


One can make choices 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>. This is an example of guarded choice[].
captures failure
 
alternatives may overlap
 
... and mathematical case analisys
 
there is a default case
 
One can make choices 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.


=== The pipe combinator ===
=== The pipe combinator ===
283

edits