
struct MyData {
   func reverse(mylist: [Int]) -> ReversedCollection<Array<Int>> {
      let reversed = mylist.reversed()
      return reversed
   }
   func reverseArray() {
      let reversedlist = reverse(mylist: [1, 2, 3, 4, 5])
      print(Array(reversedlist))  // "[5, 4, 3, 2, 1]"
   }
}
let data = MyData()
data.reverseArray()
