Pipe-calculus: Difference between revisions

Line 28: Line 28:
* <code>run x</code> runs a program given its name.
* <code>run x</code> runs a program given its name.
* <code>p ; q</code> runs <code>p</code> then runs <code>q</code> unless <code>p</code> fails.
* <code>p ; q</code> runs <code>p</code> then runs <code>q</code> unless <code>p</code> fails.
* <code>p | q</code> forks the execution of the program so that one branch runs <code>p</code>, another branch runs <code>q</code>, sharing the same input and output stream.
* <code>p | q</code> forks the execution of the program so that one branch runs <code>p</code>, another branch runs <code>q</code>, sharing the same input stream.


Start by writing a routine that copies a natural number from the input to the output.
Start by writing a routine that copies a natural number from the input to the output.
283

edits