title: Comparing protocol references
body: <p>I have an array of protocols. now I want to remove an item from the array, by finding the index of the protocol with the array. however, when comparing the protocol object with the items in the array, the compiler warns with:</p>
  
  <blockquote>
    <p>'Protocol' does not conform to AnyObject</p>
  </blockquote>
  
  <pre><code>protocol SomeProtocol {}
  var list:[SomeProtocol] = []
  func add(some:SomeProtocol) { list+=some }
  func remove(some:SomeProtocol) {
      var index = -1
      for i in 0...list.count-1 { if [i] === some { index = i } }
      if index &gt;= 0 { list.removeAtIndex(index) }
  }
  </code></pre>