(define (reverse l)
(if (null? l)
'()
(cons (reverse (cdr
l)) (car l))
)
)
==> (reverse '(a b c d e ))
(((((() . e) . d) . c) . b) . a)
(define (allbutlast x)
(if (null? (cdr x))
`()
(cons (car x) (allbutlast (cdr x)))
)
)
(define (reverse x)
(if (null? x)
`()
(cons (last x) (reverse (allbutlast x)))
)
)