thin-provisioning-tools/functional-tests/loops.scm

14 lines
252 B
Scheme
Raw Normal View History

(library
(loops)
(export upto)
(import (rnrs))
(define-syntax upto
(syntax-rules ()
((_ (var count) body ...)
(let loop ((var 0))
(when (< var count)
(begin body ...)
(loop (+ 1 var))))))))