resource sum()
	op p (val int a) returns int  result

	int  b[0:9]
	b[0] = 0
	b[1] = 49
	b[2] = -2
	b[3] = 4
	b[4] = 11
	b[5] = -23
	b[6] = 35
	b[7] = 30
	b[8] = -4567
	b[9] = 1
	for [ i = lb(b) to ub(b)  ] {
	    write(i,b[i],p(b[i]))
	}


	proc p(a) returns result  {
		if (a <= 0) {
			result = 0
		} else {
			result = a + p(a-1)
		}
	}
end
