Why does the reverse() function in the Swift standard library return ReverseRandomAccessCollection?
问题 Now that I've learned Swift (to a reasonable level) I'm trying to get to grips with the standard library, but in truth it's mainly ελληνικά to me! So a specific question: I have an array of strings and I can call reverse() on it. let arr = ["Mykonos", "Rhodes", "Naxos"].reverse() Now naively I thought I'd get back a type of Array from this. (Ruby for example has a similar method that you pass an array and get back an array) But arr is now actually of type ReverseRandomAccessCollection<Array