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

g ::= fn(modulator: int, x : ..) int {
  total := 0;
  for e := x {
  	  total += modulator * (e as int);
  }
  total
};

f ::= fn(x : ..) int {
  g(2, x)
};

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

	puti(f()); 
};

main();