Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Guides/Merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
```
Expand Down