sicp/2_18.sch

7 lines
150 B
Plaintext
Raw Permalink Normal View History

2021-08-29 21:46:29 +00:00
(define (reverse l)
(define (reverse-acc l acc)
(if (null? l)
acc
(reverse-acc (cdr l) (cons (car l) acc))))
(reverse-acc l '()))