summaryrefslogtreecommitdiff
path: root/std/arr.toc
diff options
context:
space:
mode:
Diffstat (limited to 'std/arr.toc')
-rw-r--r--std/arr.toc6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/arr.toc b/std/arr.toc
index fcf6a45..af89ecb 100644
--- a/std/arr.toc
+++ b/std/arr.toc
@@ -11,7 +11,7 @@ pkg "arr";
if a.len >= a.cap {
a.cap = a.cap * 2 + 2;
new_data := new(t, a.cap);
- each i := 0..a.len-1 {
+ for i := 0..a.len-1 {
new_data[i] = a.data[i];
}
a.data = new_data;
@@ -20,8 +20,8 @@ pkg "arr";
a.len += 1;
};
-#export arr_foreach ::= fn(t ::=, a : Arr(t), f : fn(&t)) {
- each i := 0..a.len-1 {
+#export arr_forfor ::= fn(t ::=, a : Arr(t), f : fn(&t)) {
+ for i := 0..a.len-1 {
f(&a.data[i]);
}
};