diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-04 15:52:42 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-03-04 15:52:42 -0500 |
commit | c171453f6b78c005c12fb8471256ef18b79ee9a9 (patch) | |
tree | 53c9dd662da2d34b20dfa57a0c42e1c45c411ca5 /test.toc | |
parent | 55aa79694b1589699134b1f5d2480a7b4ff27782 (diff) |
started varargs
Diffstat (limited to 'test.toc')
-rw-r--r-- | test.toc | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -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 |