Slide 12.2: Concepts and examples Slide 12.4: Syntax of the lambda calculus (cont.) Home |
![]() |
nil
represents the empty list.
( lambda n . n * 2 + 3 ) 7 ⇒ ( n * 2 + 3 ) [7/n] ⇒ 7 * 2 + 3 ⇒ 14 + 3 ⇒ 17
<expr> ::= <var> ; lowercase identifiers | <constant> ; predefined objects | ( <expr> <expr> ) ; combinations | ( &lambda <var> . <expr> ) ; abstractionsA function abstraction is an expression for a function. The identifier is the name of the parameter; it is said to be bound. An unbound identifier is free. The function itself has no name. Application is left associative,
f x y = (f x) y
.
The constants include true
, false
, integers
, some functions such as plus
, minus
, and a conditional function (if
).