Max function for the set of parameters
There is an interesting discussion in the Russian forum going.
What is the best solution for the function which returns the max for the set of parameters?
From the listed solutions I like this one:
ClassMethod max(args...) { for i=1:1:args { s max(+$g(args(i))) = i } s i="", max=$o(max(i),-1, i) Q $lb(max, i) }
It's great to see when Globals (or Locals in this case) are used in so elegant way.
Your variant?