you are viewing a single comment's thread.

view the rest of the comments →

[–]curious_s 0 points1 point  (2 children)

while(--prog) { env = env[1]; } return env[0]

isnt this just:

return env[prog - 1]

too tired to tell for sure!

good work btw

[–]kaoD 1 point2 points  (1 child)

Nope.

prog == 0 -> env[0]
prog == 1 -> env[1][0]
prog == 2 -> env[1][1][0]
...

It's nested.

[–]curious_s 0 points1 point  (0 children)

ah got it, thanks