I'm trying to write a naive curried function in Python 2.7, but it seems like the inner lambda doesn't have an access to the parent lambda scope.
For simplicity, let's take this function:
add = lambda a: lambda b: a + b
The inner lambda's scope can't access the outer one (Python can't recognize a
).
Is there a convenient way to make the outer scope accessible?