Lecture overview -- Keyboard shortcut: 'u'  Previous page: Anonymous functions -- Keyboard shortcut: 'p'  Next page: Optional parameters of Scheme functions (1) -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 2 - Page 39 : 46
Functional Programming in Scheme
Expressions, Types, and Functions
Lambda expressions in Scheme


(lambda (formal-parameter-list) expression)


(lambda formal-parameters-name expression)

  • Lambda expression characteristics in Scheme:

    • No type declaration of formal parameter names

    • Call by value parameters

      • In reality passing of references to lists and other structures

    • Positional and required parameters

      • (lambda (x y z) expr) accepts exactly three parameters

    • Required and rest parameters

      • (lambda (x y z . r) expr) accepts three or more parameters

    • Rest parameters only

      • (lambda r expr) accepts an arbitrary number of parameters

Go to exerciseParameter passing in Scheme