aboutsummaryrefslogtreecommitdiff
path: root/src/all.hff
diff options
context:
space:
mode:
Diffstat (limited to 'src/all.hff')
-rw-r--r--src/all.hff10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/all.hff b/src/all.hff
index e8298b0..13051c6 100644
--- a/src/all.hff
+++ b/src/all.hff
@@ -16,6 +16,16 @@ defmacro assert {
]
}
+defmacro foreach(x, i, a, ...body) [
+ {
+ let $a = a;
+ for let i = 0; i < $a.#len; ++i {
+ let x = $a[i];
+ { body }
+ }
+ }
+]
+
/// Types
struct Type;