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.




procedure main()
   local l
   l := [7,8,6,9,4,5,2,3,1]
   write(max(l))
end
 
procedure max(l)
   local max
   max := l[1]
   every max <:= !l
   return max
end