Advertisement
VladNitu

CPL - Mutation - BoxC Interp

Mar 11th, 2023
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.28 KB | None | 0 0
  1. case BoxC(v) => {
  2.      val (v1, st2) = interp(v, nv, st1)
  3.      val newLocation = newLoc(st2)
  4.      val newLocation2 = newLocation + 1
  5.      val box = BoxV(newLocation2)
  6.      val st3 = extendStore(Cell(newLocation, box), st2)
  7.  
  8.      (box, extendStore(Cell(newLocation2, v1), st3))
  9.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement