From R5RS under 4.2.4 Iteration –
(let ((x '(1 3 5 7 9)))
(do ((x x (cdr x))
(sum 0 (+ sum (car x))))
((null? x) sum)))
What is the usage of – cdr and car .
And what happens with this x in the lines –
(do ((x x (cdr x))
(sum 0 (+ sum (car x))))
((null? x) sum))
The loop adds up the items in the list.