Created
August 5, 2023 19:04
-
-
Save MattAlp/515201460c6640ff624381a81e455a90 to your computer and use it in GitHub Desktop.
From Discord in response to my macro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template nfor(name:string, idx: untyped, loop_range: untyped, body:untyped): untyped = | |
block `name`: | |
for `idx`{.inject.} in `loop_range`: | |
`body` | |
nfor "outer", i, 0..5: | |
nfor "inner", j, 0..5: | |
echo i, j |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment