Section #7:
===========

1. Try to finish the Complexity explanations + patterns quickly.

2. Answer questions on PS#2, Explanations of modulo (when we say that something
   equals n mod m we mean that it is in the set of km+n).

3. List functions - for each example explain using "intuition", block-pointer
   diagram and analize the running time.
   Appending two lists:
     (define append
       (method (l1 l2)
         (if (null? l1)
           l2
           (cons (head l1) (append (tail l1) l2)))))
   Testing for membership:
     (define member?
       (method (x l)
         (cond
           ((null? l)      #f)
           ((= (head l) x) #t)
           (else: (member? x (tail l))))))
   Reversing a list:
     (define reverse
       (method (l)
         (if (null? l)
           '()
           (append (reverse (tail l))
                   (list (head l))))))
   A tail-recursive linear version:
     (define reverse
       (method (l)
         (bind-methods ((iter (result l)
                          (if (null? l)
                            result
                            (iter (cons (head l) result)
                                  (tail l)))))
           (iter '() l))))