Task

Create a function that returns the maximum value in a provided set of values,

where the number of values may not be known until run-time.




def max (int<> list)
	decl int max i
	set max list<0>
 
	for (set i 1) (< i (- (size list) 1)) (inc i)
		if (> list<i> max)
			set max list<i>
		end if
	end for
 
	return max
end max