title: Swift: Why can't I use 'contains(: )"?
body: <p>Step 1:
  I declared a protocol, named <code>ARDevice</code>:</p>
  
  <pre><code>protocol ARDevice {
      var deviceName:String{get}
  }
  </code></pre>
  
  <p>Step 2:
  Then I used it to extend <code>NSNetService</code>：</p>
  
  <pre><code>extension NSNetService:ARDevice{
      var deviceName:String{
         get{
             return self.name
         }
      }
  }
  </code></pre>
  
  <p>Step 3: I created an array:</p>
  
  <pre><code>var deviceList = [ARDevice]()
  </code></pre>
  
  <p>Step 4: I want to use <code>contains(:)</code> in a call back method, but I can't:
  <a href="https://i.stack.imgur.com/w6TCM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w6TCM.png" alt="enter image description here"></a></p>
  
  <p>How can I do that?
  Am I have to implement any protocol?</p>