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.




 
MaxVal(SET OF INTEGER s) := MAX(s);
 
//example usage
 
SetVals := [4,8,16,2,1];
MaxVal(SetVals) //returns 16;
 