What is the function to a list in Scheme? It needs to be able to handle nested lists.
So that if you do something like (reverse \'(a (b c d) e)) you\'ll
(reverse \'(a (b c d) e))
This is a reverse function in Racket which I like much better that Scheme. It uses the match pattern matching function only.
(define/match (rev l) [('()) '()] [((list a ... b)) (cons b (rev a))]) > (rev '(a (b c d) e)) '(e (b c d) a)