Lamda Calculus
In the lamda calculus there are only three main rules.
- Variables x,y,z are just values
- Abstraction (functions): λx. x + 1 means a function which takes x and returns x+1
- Application (function call): (λx. x + 1) 5 => call this function with the argument 5
1(λx. x) 42 -- Identity function, returns 42
2(λx. λy. x + y) 3 4 -- add 3 and 4, returns 7
3