Promises, Futures, and the Shape of Your Code

Promises, Futures, and the Shape of Your Code

Greg Heo

May 21, 2018

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

34 slides
  1. !

  2. networker.beginRequest(.read, success: { data in
 parser.parseRaw(data) { result in
 archiver.materialize(from:

    result) { objects in
 dataStore.save(objects) { status in
 print("Save success!") } } } }) print("Hello 1")
 print("Hello 2")
  3. networker.beginRequest(.read, success: { data in
 parser.parseRaw(data) { result in
 archiver.materialize(from:

    result) { objects in
 dataStore.save(objects) { status in
 print("Save success!") } } } }) print("Hello 1")
 print("Hello 2")
  4. networker.beginRequest(.read, success: { data in
 parser.parseRaw(data) { result in
 archiver.materialize(from:

    result) { objects in
 dataStore.save(objects) { status in
 print("Save success!") } } } })
  5. ❓

  6. %&

More Decks by Greg Heo

Other Decks in Technology