To be very frank, I am totally new to learn Extension creation and usage.
I wanted to create a category (Extension in swift 3.0) which can be used throughout an application to perform repeated operations for Array.
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.
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).
extension _ArrayType where Generator.Element == Intextension Array where Element: Equatableextension Array where Element == Intextension _ArrayType where Generator.Element == Floatextension SequenceType where Self.Generator.Element: FloatingPointTypeextension Array where Element: DoubleValueextension Sequence where Iterator.Element == String
,etc...
Note : In short, we can consider that I want to perform actions based on Array in single extension instead of just creating the single extension for each of the datatypes as per above requirement.
extension Array { ... }. What problem are you having with that?