lambda abstraction
lambda abstraction
\\ x . \\ y . x+y
is read as
\\ x . (\\ y . x+y).
A nested abstraction such as this is often abbreviated to:
\\ x y . x + y
The lambda expression (\\ v . E) denotes a function which takesan argument and returns the term E with all free occurrencesof v replaced by the actual argument. Application isrepresented by juxtaposition so
(\\ x . x) 42
represents the identity function applied to the constant 42.
A lambda abstraction in Lisp is written as the symbollambda, a list of zero or more variable names and a list ofzero or more terms, e.g.
(lambda (x y) (plus x y))
Lambda expressions in Haskell are written as a backslash,"\\", one or more patterns (e.g. variable names), "->" and anexpression, e.g. \\ x -> x.