diff options
author | Arun Isaac | 2021-05-07 16:43:57 +0530 |
---|---|---|
committer | Arun Isaac | 2021-05-07 16:43:57 +0530 |
commit | cd506874cbd25801b90ba4ce8a3dff1041865e8a (patch) | |
tree | c37490c35fe746970e3544818655f18e3fa35443 | |
parent | 319dea49745c0f1b7c95fe8e3078794407c4c7c6 (diff) | |
download | nsmc-cd506874cbd25801b90ba4ce8a3dff1041865e8a.tar.gz nsmc-cd506874cbd25801b90ba4ce8a3dff1041865e8a.tar.lz nsmc-cd506874cbd25801b90ba4ce8a3dff1041865e8a.zip |
Define for-i-step sc macro.
* src/macros/macros.sc (for-i-step): New macro.
-rw-r--r-- | src/macros/macros.sc | 6 |
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 ... |