From c171453f6b78c005c12fb8471256ef18b79ee9a9 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Wed, 4 Mar 2020 15:52:42 -0500 Subject: started varargs --- test.toc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'test.toc') 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 -- cgit v1.2.3