[functional tests] start a (loops) library

Contains upto.
This commit is contained in:
Joe Thornber 2017-08-17 14:11:59 +01:00
parent a7d0e687e8
commit a70c25e912

View File

@ -0,0 +1,13 @@
(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))))))))