Calculates the cumulative maximum of an array.
The array
const result = Chalkboard.stat.cummax([3, 1, 4, 2, 5]); // Returns [3, 3, 4, 4, 5] Copy
const result = Chalkboard.stat.cummax([3, 1, 4, 2, 5]); // Returns [3, 3, 4, 4, 5]
Calculates the cumulative maximum of an array.