title: Extending typed Arrays (of primitive types like Bool) in Swift 3?
body: <p>Previously in Swift 2.2 I'm able to do:</p>
  
  <pre><code>extension _ArrayType where Generator.Element == Bool{
      var allTrue : Bool{
          return !self.contains(false)
      }
  }
  </code></pre>
  
  <p>which extends <code>[Bool]</code> with <code>.allTrue</code>. E.g.</p>
  
  <pre><code>[true, true, false].allTrue == false
  </code></pre>
  
  <p>But in Swift 3.0 I'm getting this error:</p>
  
  <blockquote>
    <p>undeclared type <code>_ArrayType</code></p>
  </blockquote>
  
  <hr>
  
  <p>So I tried switching it to <code>Array</code> and using the new keyword <code>Iterator</code></p>
  
  <pre><code>extension Array where Iterator.Element == Bool
      var allTrue : Bool{
          return !self.contains(false)
      }
  }
  </code></pre>
  
  <p>But I got a different error complaining that I'm forcing element to be non-generic</p>
  
  <blockquote>
    <p>Same-type requirement makes generic parameter 'Element' non-generic</p>
  </blockquote>
  
  <hr>
  
  <p>I've also tried the solutions in this <a href="https://stackoverflow.com/questions/24027116/how-can-i-extend-typed-arrays-in-swift">2 years old post</a> but to no avail. </p>
  
  <p>So how does one extend arrays of primitive types like Bool in Swift 3?</p>