aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/macros/macros.sc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/macros/macros.sc b/src/macros/macros.sc
index 5ba9e1f..5c0d578 100644
--- a/src/macros/macros.sc
+++ b/src/macros/macros.sc
@@ -32,6 +32,12 @@
(set+ index 1))
body ...))
+(sc-define-syntax (for-i-step index start max step body ...)
+ (for ((define index int start)
+ (<= index max)
+ (set+ index step))
+ body ...))
+
(sc-define-syntax (with-alloc var type allocate free body ...)
(let* ((var type allocate))
body ...