;; IN: two lists ;; OUT: a list which is result of combining the two lists ;; BEHAVIOR: destructively combines the two lists. Preserves original pointer (define (append! ls1 ls2) (if (null? ls1) ls2 (set-cdr! (last-pair ls1) ls2))) (define (last-pair ls) (if (null? (cdr ls)) ls (last-pair (cdr ls))))