(define (reverse xs)
(if (null? xs)
'()
(append (reverse (cdr xs)) (list (car xs)))))
(define x (list 1 2 3))
(display (reverse x))
(newline)
(display (append (list (caddr x)) (append (list (cadr x)) (append (list (car x)) '()))))
(newline)
(display (append (list (caddr x)) (append (list (cadr x)) (list (car x)))))
(newline)
KGRlZmluZSAocmV2ZXJzZSB4cykKCShpZiAobnVsbD8geHMpCgkJJygpCgkJKGFwcGVuZCAocmV2ZXJzZSAoY2RyIHhzKSkgKGxpc3QgKGNhciB4cykpKSkpCgkJCihkZWZpbmUgeCAobGlzdCAxIDIgMykpCgooZGlzcGxheSAocmV2ZXJzZSB4KSkKKG5ld2xpbmUpCgooZGlzcGxheSAoYXBwZW5kIChsaXN0IChjYWRkciB4KSkgKGFwcGVuZCAobGlzdCAoY2FkciB4KSkgKGFwcGVuZCAobGlzdCAoY2FyIHgpKSAnKCkpKSkpCihuZXdsaW5lKQoKKGRpc3BsYXkgKGFwcGVuZCAobGlzdCAoY2FkZHIgeCkpIChhcHBlbmQgKGxpc3QgKGNhZHIgeCkpIChsaXN0IChjYXIgeCkpKSkpCihuZXdsaW5lKQ==