Generics in Swift 4