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.




fn MaxValue AnArray = 
(
	if AnArray.count != 0 then
	(
		local maxVal = 0
		for i in AnArray do if i > maxVal then maxVal = i
		maxVal
	)
	else undefined
)