Here is an example of what I\'d like to achieve:
protocol SomeType {}
class SomeClass: SomeType {}
struct SomeGenericStruct {
typealias E = A
You can use generic method for this:
func take(someType: SomeGenericStruct) { }
The only problem with this is that you can not pass SomeGenericStruct
to it. It must be a generic of some concrete type instead. If totally necessary, you can just have two functions doing the same thing essentially:
func take(someInput: SomeGenericStruct) { /* do stuff */ }
func take(someType: SomeGenericStruct) { /* do same stuff */ }