pau-riquelme

Untitled

Oct 4th, 2017
646
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.  
  5.        for index in indices {
  6.            result.append(self.items[index])
  7.        }
  8.  
  9.        return result
  10.    }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment