public func sorted(by areInIncreasingOrder: (Element, Element) -> Bool) -> [Element]
var arr = [1,323,31]
arr.sorted(by: {(a:Int,b:Int)->Bool in
return a > b
})
arr.sorted(by: {
(a,b) -> Bool in
return a > b
})
arr.sorted(by: {
(a,b) in
return a < b
})
arr.sorted(by: {
(a,b) in a < b
})
arr.sorted(by: >)
arr.sorted(by: <)
arr.sorted(by: {
$0 > $1
})
arr.sorted(){
$0 < $1
}