double-up - (set-cdr ls(cdar ls(set-cdr(car ls(caar...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
(define (double-up! ls) (cond ((null? ls) 'okay) ((null? (cdr ls)) 'okay) (else (begin (define temp (car ls)) (set-car! ls (cdr ls))
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (set-cdr! ls (cdar ls)) (set-cdr! (car ls) (caar ls)) (set-car! (car ls) temp) (double-up! (cdr ls))))))...
View Full Document

This note was uploaded on 11/30/2010 for the course EECS 21281 taught by Professor Harvey during the Spring '10 term at Berkeley.

Ask a homework question - tutors are online