TIL `String` in Swift has `sorted()` returning `[Character]`; `Array` of `Equatable` is `Equatable`
Findings of the day:
-
String
hassorted()
returning[Character]
. First, I wasn’t expecting it having this at all. Second, I wasn’t expecting this func return array of characters but not aString
. Probably I should examine allString
API. Haven’t done this in a while. -
Array
ofEquatable
isEquatable
. This is logical. But I remember implementing this on my own sime time ago. Interesting to find which Swift version broght this.