Play audio slide show -- Keyboard shortcut: 'x'  Lecture overview -- Keyboard shortcut: 'u'  Previous page: Functions as first class values -- Keyboard shortcut: 'p'  Next page: Lambda expressions in Scheme -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home      Expressions, Types, and Functions - slide 38 : 46

Anonymous functions

A function object does not have a name, and a function object is not necessarily bound to a name

1> ((lambda(x) (+ x 1)) 3)
4

2> (define fu-lst 
  (list (lambda (x) (+ x 1)) (lambda (x) (* x 5))))

3> fu-lst
(#<procedure> #<procedure>)

4> ((second fu-lst) 6)
30