max - maximum of two or more values
res =
a.max(b)
res =
a.max(b, c,
...)
Returns the maximum of its arguments.
If called with two arguments, max returns the larger of a and b. If either a or b is an array, the operation is vectorized across the arrays.
If called with more than two arguments, max returns the maximum of all provided arguments.
For strings, max uses lexicographical order.
Returns the maximum of the inputs.
ArgCheck: Thrown if fewer than 2 arguments are provided.
TypeCheck: Thrown if the arguments are not comparable.
ShapeCheck: Thrown if the arguments are arrays with
incompatible shapes.
10->max(20)
20
1->max(2, 3, 4)
4
[1, 5, 3].max(2)
2 5 3
"apple".max("banana")
"banana"