Examples (Blackboard)

left top right

(define x 10)

(if (= x 10) 1 2)

(define absolute-value
  (lambda (x) (if (negative? x) (- x) x)))

(define absolute-value 
  (lambda (x)
    (cond ((zero? x) 0)
          ((negative? x) (- x))
          (else x))

Jim Miller W3C