S-99-08 Eliminate consecutive duplicates of list elements.
If a list contains repeated elements they should be replaced with a single copy of the element. The order of the elements should not be changed.
(compress '(a a a a b c c a a d e e e e)) ; => (a b c a d e)
(define compress (lambda (xs) (cond ((null? xs) '()) ((null? (cdr xs)) xs) ((eq? (car xs) (cadr xs)) (compress (cdr xs))) (else (cons (car xs) (compress (cdr xs)))))))