iOS Fluent interfaces
Ernesto Torres
91

I think it would be better and less error prone to set block as nil after calling:
if let response = apiResponse {

successHandler(response)

successHandler = nil

}

else if let error = apiError {

errorHandler(error)

errorHandler = nil

}
If you are interesting in you can check my repo with same idea https://github.com/AndreyPanov/ChainClosure
Thank you for the post.

Show your support

Clapping shows how much you appreciated Andrey Panov’s story.