Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol SomeProtocol: Equatable {
- func bla()
- }
- class SomeClass {
- var protocols = [SomeProtocol]()
- func addElement(element: SomeProtocol) {
- self.protocols.append(element)
- }
- func removeElement(element: SomeProtocol) {
- if let index = find(self.protocols, element) {
- self.protocols.removeAtIndex(index)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement