fix merge example (#140)

This commit is contained in:
k-kohey authored and GitHub committed 2022-04-08 08:47:25 -07:00
1 parent b6755e6313
commit c174e4603e
1 file changed
+3 -3
+3 -3
View File
@@ -6,10 +6,10 @@
Merges two or more asynchronous sequences sharing the same element type into one singular asynchronous sequence.
```swift
let appleFeed = URL("http://www.example.com/ticker?symbol=AAPL").lines.map { "AAPL: " + $0 }
let nasdaqFeed = URL("http://www.example.com/ticker?symbol=^IXIC").lines.map { "^IXIC: " + $0 }
let appleFeed = URL(string: "http://www.example.com/ticker?symbol=AAPL")!.lines.map { "AAPL: " + $0 }
let nasdaqFeed = URL(string:"http://www.example.com/ticker?symbol=^IXIC")!.lines.map { "^IXIC: " + $0 }
for try await ticker = merge(appleFeed, nasdaqFeed) {
for try await ticker in merge(appleFeed, nasdaqFeed) {
print(ticker)
}
```