pau-riquelme

Untitled

Oct 10th, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.27 KB | None | 0 0
  1. extension Storage {
  2.     subscript<Indices: Sequence>(indices: Indices) -> [Item] where Indices.Iterator.Element == Int {
  3.         var result = [Item]()
  4.         for index in indices {
  5.             result.append(self.items[index])
  6.         }
  7.     return result
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment