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

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!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.