implementation, ctd
(define (size b)
(define (count cell)
(if (eq? (car b) cell)
1
(inc (count (cdr cell)))))
(count (cdr b)))
; a hidden operation: (prev c) is the cell that precedes c
(define (prev c)
(define (follow current)
(let ((next (cdr current)))
(if (eq? c next)
current
(follow next))))