I am using Swift 4 and looking for a way to create extension function for array collection with arguments of type
typealias Listener<T> = (T) -> Void
however extension below cannot be created (Use of undeclared type 'T')
extension Sequence where Element == Listener<T>{
func callAll(t: T){
self.forEach { $0(t) }
}
}
Is there a way to make it work?