summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-04 15:52:42 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-04 15:52:42 -0500
commitc171453f6b78c005c12fb8471256ef18b79ee9a9 (patch)
tree53c9dd662da2d34b20dfa57a0c42e1c45c411ca5 /test.toc
parent55aa79694b1589699134b1f5d2480a7b4ff27782 (diff)
started varargs
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc10
1 files changed, 2 insertions, 8 deletions
diff --git a/test.toc b/test.toc
index f9e9d40..441cc5f 100644
--- a/test.toc
+++ b/test.toc
@@ -1,11 +1,7 @@
#include "std/io.toc", io;
-arr_sum ::= fn(t,n::=, a:[n]t) t {
- total := 0 as t;
- for x := a {
- total += x;
- }
- total
+foo ::= fn(x: ..) {
+
};
main ::= fn() {
@@ -13,7 +9,5 @@ main ::= fn() {
a[0] = 1;
a[1] = 1;
a[2] = 1;
-
- io.puti(arr_sum(a));
};
main(); \ No newline at end of file