Lecture overview -- Keyboard shortcut: 'u'  Previous page: A page with graphics -- Keyboard shortcut: 'p'    Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Slide 4 : 4

A page with a source program 

(define (negate p)
  (lambda (x) 
    (if (p x) #f #t)))
 

;; Calculate the factorial of n.
;; .parameter n An integer
;; .pre-condition The integer must be non-negative.
;; .returns n!
(define (fac n)
  (if (= 0 n) 1 (* n (fac (- n 1)))))
 

prog3.scmThe fib function.