title: Generic Extension for Array in Swift
body: <p><strong>To be very frank, I am totally new to learn Extension creation and usage.</strong></p>
  
  <p>I wanted to create a category (Extension in swift 3.0) which can be used throughout an application to perform repeated operations for <strong><em>Array</em></strong>.</p>
  
  <p><a href="https://stackoverflow.com/questions/31806324/extend-array-types-using-where-clause-in-swift">Sample Link 1</a></p>
  
  <p>This is what I have seen and understand while doing research, I wanted to create an extension with various methods which should be generic, and not on the basis of datatype needed to create separate extensions.</p>
  
  <p>Here in above example, we will need to create single extension if we will go for particular datatype wise extension. I wanted to have a guidance if any way is there to create the generic category (Extension in swift).</p>
  
  <ol>
  <li><code>extension _ArrayType where Generator.Element == Int</code></li>
  <li><code>extension Array where Element: Equatable</code></li>
  <li><code>extension Array where Element == Int</code></li>
  <li><code>extension _ArrayType where Generator.Element == Float</code></li>
  <li><code>extension SequenceType where Self.Generator.Element: FloatingPointType</code></li>
  <li><code>extension Array where Element: DoubleValue</code></li>
  <li><code>extension Sequence where Iterator.Element == String</code></li>
  </ol>
  
  <p>,etc...</p>
  
  <p><a href="https://github.com/apple/swift/blob/master/CHANGELOG.md" rel="noreferrer">Sample Link 2</a></p>
  
  <p><strong>Note :</strong> In short, we can consider that I want to perform actions based on <strong><em>Array</em></strong> in single extension instead of just creating the single extension for each of the datatypes as per above requirement.</p>