You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -287,7 +287,9 @@ idCache.whenCached { id in
287
287
288
288
### Compose Promises
289
289
290
-
Inspired by PromiseKit, SwiftObserver allows to compose asynchronous calls using promises. You can chain asynchronous calls sequentially:
290
+
Inspired by PromiseKit, SwiftObserver allows to compose asynchronous calls using promises.
291
+
292
+
#### Sequential Composition
291
293
292
294
```swift
293
295
promise { // just for nice consistent closure syntax
@@ -303,7 +305,7 @@ promise { // just for nice consistent closure syntax
303
305
304
306
You call `then` on a first `Promise` and pass it a closure that returns the second `Promise`. That closure takes the value of the first promise, allowing the second promise to depend on it. `then` returns a new `Promise` that provides the value of the second promise.
305
307
306
-
And you can start asynchronous calls concurrently:
0 commit comments