Closure (computer programming)
return lambda x: (f(x + dx) - f(x)) / dxPython must often use named functions instead because its lambda expressions may only contain other expressions (code that returns a value) and not statements (code that has effects but no value). But in other languages, such as Scheme, all code returns a value; in Scheme, everything is an expression.