OFFSET
0,3
LINKS
PROG
(Scheme function, destructive implementation of this automorphism acting on S-expressions:) (define (*A123713! s) (cond ((not (pair? s)) s) ((pair? (car s)) (let ((org_cdar (cdar s))) (set-cdr! (car s) (cdr s)) (set-cdr! s (caar s)) (set-car! (car s) org_cdar) s)) ((and (pair? (cdr s)) (pair? (cadr s)) (pair? (caadr s)) (pair? (caaadr s))) (let ((org_b (car (caaadr s)))) (set-car! (caaadr s) (cdr (caaadr s))) (set-cdr! (caaadr s) (cdaadr s)) (set-cdr! (caadr s) (cdadr s)) (set-cdr! (cadr s) (cddr s)) (set-cdr! (cdr s) org_b) s)) (else s)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 11 2006
STATUS
approved