diff options
Diffstat (limited to 'mew.scm')
-rw-r--r-- | mew.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mew.scm b/mew.scm index 053ad98..f4537c0 100644 --- a/mew.scm +++ b/mew.scm @@ -191,10 +191,17 @@ (,(rename append) ... (,(rename list) ,@y)))) )))))) + (define-syntax rep-internal + (syntax-rules () + ((_ (bindings ...) name () (body ...)) + (let name (bindings ...) body ...)) + ((_ (bindings ...) name (x y brest ...) body) + (rep-internal (bindings ... (x y)) name (brest ...) body)))) + (define-syntax rep (syntax-rules () - ((_ name ((var val) ...) body ...) - (let name ((var val) ...) body ...)))) + ((_ name (bindings ...) body ...) + (rep-internal () name (bindings ...) (body ...))))) (define-syntax while (syntax-rules () |