CTM: Exercise 4-5
[ Posted by Urban Hafner ]
The problem
The Wait operation. Explain why the {Wait X} operation could be defined as:
proc {Wait X}
if X==unit then skip else skip end
endUse your understanding of the dataflow behavior of the if statement and == operation.
My solution
The idea of Wait is to wait until its argument become bound. The == (i.e. the entailment check) is used to make the procedure wait. The if statement is needed, because == returns a value but Wait doesn’t. To get rid of this value you simply wrap the call to == in an if statement and let the if return nothing.

