Draw out the following environment diagram:

x = 6
def x(x):
    return x + y(x)

def y(x):
    return x

y(x)(4)

Toggle Solution

Here’s a visualization of the environment diagram. If you are stuck, remember the rules of environment diagrams.

I don't claim to be perfect so if you find an error on this page, please send me an email preferably with a link to this page so that I know what I need to fix!

comments powered by Disqus