Slide 45
Slide 45 text
struct WeatherService {
enum Result {
case success(WeatherReport)
case failure(WeatherService.Error)
}
func fetchWeatherReport(latitude: Double, longitude: Double,
completion: @escaping (_ result: WeatherService.Result) -> Void)
{
dataSource.fetchWeatherReport(latitude: latitude, longitude: longitude,
completion: completion)
}
}