(def rev (xs) " Reverses a sequence. " ((afn (xs acc) (if (no xs) acc (self (cdr xs) (cons (car xs) acc)))) xs nil)) (defpat rev-pat (x) (rev-pat x nil) ((x . xs) acc) (rev-pat xs (cons x acc)) (() acc) acc)