See below code,
videoFiles.sort { (f1, f2) -> Bool in
return f1.sn < f2.sn
}
videoFiles.sort { $0.sn < $1.sn }
I can use the seond `sort` to replace the first one. However, if I am someone who always prefers to what Xcode suggests, I probably will use
videoFiles.sort { $0.0.sn < $0.1.sn }
because Xcode suggests `0` and `1` after you type `$0.`, without suggesting any instance properties or methods of `VideoFile`.
I do know `(f1, f2)` is considerred as a turple. I just don't like the suggestions Xcode provides. I think using `$0, $1...` is better than `$0.1, $0.2...`.
Xcode 8.0 (8A218a), Swift 3, macOS Sierra 10.12 (16A323).