summaryrefslogtreecommitdiff
path: root/test.toc
blob: da2dd79acc3b8264898c75d74f36ede9ffd27323 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "std/io.toc";

f ::= fn(x : ..) int {
  total := 0;
  for _, i := x {
  	  total += i * (x[0] as int);
  }
  total
};


main ::= fn() {
	 puti(f(5));
	 
	 puti(f(5,6));
	 
	 puti(f(1,2,3));
	 
	 puti(f(1,1,1,1));
	 
};

main();