Using Closures, generics, POP and protocols with associated types to create reusable API’s for your…
James Rochabrun
46316

Great tutorial, thanks.

You have an error in your code snippet above (which you don’t have in your final product):

//2)
enum Result {
case Success(T)
case Error(ItunesApiError)
}

It should be:

//2)
enum Result<T> {
case Success(T)
case Error(ItunesApiError)
}

Otherwise, you get compile errors.

Cheers!