;; Scheme: recursion and named let are the core; do is available
(let loop ((i 0))
(when (< i 5)
(display i)
(loop (+ i 1))))
(do ((i 0 (+ i 1))) ; do loop: (var init step)
((= i 5)) ; termination test
(display i))
(for-each (lambda (x) (display x)) '(a b c))
;; Racket's for family
(for ([i (in-range 5)]) (display i))
(for/list ([i (in-range 5)]) (* i i)) ; '(0 1 4 9 16)
(for/sum ([i (in-range 101)]) i) ; 5050
(for*/list ([i 3] [j 2]) (list i j)) ; nested
;; Common Lisp
(dotimes (i 5) (print i))
(dolist (x '(a b c)) (print x))
(loop for i from 1 to 10 when (evenp i) collect (* i i)) ; (4 16 36 64 100)