Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. protocol SomeProtocol: Equatable {
  2. func bla()
  3. }
  4.  
  5. class SomeClass {
  6.  
  7. var protocols = [SomeProtocol]()
  8.  
  9. func addElement(element: SomeProtocol) {
  10. self.protocols.append(element)
  11. }
  12.  
  13. func removeElement(element: SomeProtocol) {
  14. if let index = find(self.protocols, element) {
  15. self.protocols.removeAtIndex(index)
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement