[functional tests] start a (loops) library
Contains upto.
This commit is contained in:
parent
a7d0e687e8
commit
a70c25e912
13
functional-tests/loops.scm
Normal file
13
functional-tests/loops.scm
Normal 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))))))))
|
||||
|
Loading…
Reference in New Issue
Block a user