aboutsummaryrefslogtreecommitdiff
path: root/src/all.hff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-11 07:48:24 +0200
committerlemon <lsof@mailbox.org>2022-08-11 07:48:24 +0200
commit86aa2d6ab3a003652159fa37828c27744a2cb45d (patch)
tree6695bdf09255c649be5f934a42a455a906817151 /src/all.hff
parent09ebbe187819f54b514db79c4382c26cda425250 (diff)
mcall ty
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;