Skip to content

Commit c174e46

Browse files
authored
fix merge example (#140)
1 parent b6755e6 commit c174e46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Guides/Merge.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
Merges two or more asynchronous sequences sharing the same element type into one singular asynchronous sequence.
77

88
```swift
9-
let appleFeed = URL("http://www.example.com/ticker?symbol=AAPL").lines.map { "AAPL: " + $0 }
10-
let nasdaqFeed = URL("http://www.example.com/ticker?symbol=^IXIC").lines.map { "^IXIC: " + $0 }
9+
let appleFeed = URL(string: "http://www.example.com/ticker?symbol=AAPL")!.lines.map { "AAPL: " + $0 }
10+
let nasdaqFeed = URL(string:"http://www.example.com/ticker?symbol=^IXIC")!.lines.map { "^IXIC: " + $0 }
1111

12-
for try await ticker = merge(appleFeed, nasdaqFeed) {
12+
for try await ticker in merge(appleFeed, nasdaqFeed) {
1313
print(ticker)
1414
}
1515
```

0 commit comments

Comments
 (0)