title: Error: Extra argument in call
body: <p>After using this code from a tutorial that apparently worked before, isn't working now using swift 3 but I'm not sure why.  The error shows on the line: if !contains(uniqueValues, value as T) </p>
  
  <pre><code>extension Array {
  
      func unique&lt;T: Equatable&gt;() -&gt; [T] {
          var uniqueValues = [T]();
  
          for value in self {
              if !contains(uniqueValues, value as T) {
                  uniqueValues.append(value as! T);
              }
          }
          return uniqueValues;
      }
  
      func first&lt;T&gt;(test:(T) -&gt; Bool) -&gt; T? {
          for value in self {
              if test(value as! T) {
                  return value as? T;
              }
          }
          return nil;
      }
  }
  </code></pre>