Menu

lambda-expressions syntax

Eric Violard

Lambda-expression syntax

  • Variable
    any identifier beginning with a lower case letter
    (ex. x, y, z, add, fac, etc.).
  • Constant
    an integer, an operator or any identifier beginning with an upper case letter.
    (some constant are predefined)
    (ex. +, *, TRUE, FALSE, etc.)
  • Abstraction: Symbol "\" is used instead of the letter Lambda of the Greek alphabet.
    \ x . E
    (ex. \x.x, \x.\y.x, etc.)
  • Application: Notation for application is juxtaposition.
    E1 E2
    (ex. fax 3, x y z, etc.)

Syntax uses usual parenthesing conventions: application priority is greater than abstraction one and application is left associative.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.