Sample code for oblig2 exercise 1

Call-by-visit emulation:

 

   X.f[visit b]

emulated by:

   home <- locate self

   move b to X

   X.f[b, home]

 

And modifying f:

   op f[arg: T, home: Node]

      ...

      move arg to home

   end f

     

Published Feb. 28, 2019 4:17 PM - Last modified Feb. 28, 2019 4:17 PM