enum resultados{
case datos(Dato: T)
case error(Error: Error)
}
the problem come when calling this function, there is no a effective way to say what the type because the completion is enum with generic that need a type to confort to Codable, but i can find a way to make it.
so calling the function
dataLoader(parms: param,completion:{result in})
here xcode complains since there is no way to infer the type of result Generic parameter 'T' could not be inferred