Commits

Maxime Buquet committed 6b551d5

Int limit set on

  • Participants
  • Parent commits 1a8a15d

Comments (0)

Files changed (1)

             eval Env.empty tl
     | Plus :: tl ->
             let v = Env.pop env in
+            let v = if v + 1 = 256 then 0 else v in
             eval (Env.push (v + 1) env) tl
     | Minus :: tl ->
             let v = Env.pop env in
+            let v = if v - 1 = (-1) then 255 else v in
             eval (Env.push (v - 1) env) tl
     | Right :: tl ->
             eval (Env.right env) tl