Example of Complication (1)
In ML:r:int ref¨§ (r:=3; r:=7; !r) (* evaluates to 7 *)
In CML [Reppy 91]:c:int chan¨§ (spawn(fn()=>send(c, 3)); spawn(fn()=>send(c, 7)); recv(c)) (* evaluates to either 3 or 7 *)
Previous slide
Next slide
Back to first slide
View graphic version