I\'ve so far got a simple (but potentially expensive) way:
var myMax = sort(myArray,>)[0]
And how I was taught to do it at school:
var numbers = [1, 2, 7, 5]; var val = sort(numbers){$0 > $1}[0];