OFFSET
0,3
LINKS
A. Karttunen, Gatomorphisms (Includes the complete Scheme program for computing this sequence)
PROG
(Scheme function implementing this automorphism on list-structures:)
(define (cdr_robl_cdr! s) (cond ((not (pair? s))) ((not (pair? (cdr s))) (swap! s)) (else (cdr_robl_cdr! (cdr s)) (robl! s) (cdr_robl_cdr! (cdr s)))) s)
(define (robl! s) (let ((ex-car (car s))) (set-car! s (cddr s)) (set-cdr! (cdr s) ex-car) (swap! (cdr s)) (swap! s) s))
(define (swap! s) (let ((ex-car (car s))) (set-car! s (cdr s)) (set-cdr! s ex-car) s))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 25 2002
STATUS
approved