Welcome to W3Courses

Copy List

Copy List Using Scheme Source Code

The following code copies a list

 (define (copy x)
       (cond((null? x) ‘())
               (else (cons (car x) (copy(cdr x)) ))))

1
Average: 1 (1 vote)