Lambda calculus ideas explained using Python intuition
In a λ-expression like λx. A, the λ introduces a name.
Any occurrence of x inside A is bound. A bound variable is simply one that is declared by a λ (or a function).
Here, x is bound because λx introduces it. y is free because nothing defines it.
A Python function behaves the same way. Parameters are bound variables.
• x is bound — the function defines it.
• y is free — it comes from outside the function.
This matches λ-calculus exactly:
λx. x y has a bound x and a free y.