Generic “Functions” in Objective-C
Since the only way to declare generic parameters and return values is through a class interface, we’ll wrap our map method in a new class[…]
[…]
AHKArrayMapper’sonly method takes an array ofInputTypeobjects and a block mapping fromInputTypetoOutputType. It returns an array ofOutputTypeobjects. The implementation doesn’t really differ from the one without generics, because generics aren’t available in implementation files[…]
Objective-C generics are useful for interfacing with Swift and for documenting APIs. I’m not sure that it really makes sense to code with them this way.