Skip to content

Instantly share code, notes, and snippets.

View dimebt's full-sized avatar
🎯
Focusing

Dimitar Stefanovski dimebt

🎯
Focusing
View GitHub Profile
fetchJSON(fromURL: "someURL") { (response, results, error) in
switch response {
case .success:
fetchUserData(for: results) { (response, results, error) in
switch response {
case .success:
loginUser(user: results) { (response, results, error) in
switch response {
case .success:
// finialy all of the callbacks are finished
fetchJSON(fromURL: "http://api.json") { (json, error) in
}