Lecture overview -- Keyboard shortcut: 'u'  Previous page: The <span>letrec</span> namebinding construct -- Keyboard shortcut: 'p'  Next page: Binding of free names -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 1 - Page 42 : 49
Programming Paradigms
Introduction to Functional Programming in Scheme
An implementation of letrec

letrec can be implemented with use of an assignment


(letrec ((n<sub>1</sub> e<sub>1</sub>) ... (n<sub>k</sub> e<sub>k</sub>)) body-expr)


(let ((n<sub>1</sub> #f) ... (n<sub>k</sub> #f)) (set! n<sub>1</sub> e<sub>1</sub>) ... (set! n<sub>k</sub> e<sub>k</sub>) body-expr)