var array = [3, 2, 1]
Creating a new sorted array
As Array conforms to SequenceType, we can generate a new array of the sorted elements using a built in sort method.
2.12.2
In Swift 2, this is done with the sort() method.
let sorted = array.sort() // [1, 2, 3]
3.0
As of Swift 3, it has...