Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun first-to-last (L)
- (labels ((fi-la (l)
- (append (cdr l) (list (car l))))
- (rec (x)
- (cond ((null x) x)
- ((atom (car x)) (cons (car x)
- (first-to-last (cdr x))))
- (t (cons (fi-la (first-to-last (car x)))
- (rec (cdr x)))))))
- (rec L)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement