Webservice class with parser using generics
Turns out I can just use the generic ModelType defined in the ParserType, and I don't need the same generic parameter in WebService;

public class WebService&lt;Parser: ParserType&gt; {
...


The typealias is just for convenience, to not type ParserType.ModelType everywhere but just ModelType.

Results in this call site: 

let transport = HTTPTransport(baseURL: URL(string: baseURLString)!)
let parser = JSONParser&lt;CategoryArray&gt;()
let webService: WebService&lt;JSONParser&lt;CategoryArray&gt;&gt; webService = WebService(transport: transport, endpoint: endPoint, parser: parser)


(And because of type inference, the last line can be reduced to let webService = WebService(transport: transport, endpoint: endPoint, parser: parser) which is neat)