b⛅
Size: a a a
b⛅
b⛅
A
b⛅
#;7> (dotted-list? '(a))
#f
#;8> (dotted-list? 'a)
#t
b⛅
(define (proper->dotted lst)
(cond
[(= 1 (length lst))
(car lst)]
[(eq? '() (cddr lst))
(cons (car lst) (cadr lst))]
[else
(cons (car lst) (proper->dotted (cdr lst)))]))
b⛅
A
A
b⛅
b⛅
b⛅
b⛅
PG