arrayMax function

double arrayMax(
  1. Array a
)

Return the greater element in the array

Examples

var n = Array([1, 2, 3]);

print(arraySum(n));

/* expected output:
3
*/

Implementation

double arrayMax(Array a) {
  return a.reduce(max);
}