Skip to content

Commit 739815f

Browse files
authored
Fix zip example (#119)
1 parent 0dfb244 commit 739815f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Guides/Zip.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
Combines the latest values produced from two or more asynchronous sequences into an asynchronous sequence of tuples.
77

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

12-
for try await (apple, nasdaq) = zip(appleFeed, nasdaqFeed) {
12+
for try await (apple, nasdaq) in zip(appleFeed, nasdaqFeed) {
1313
print("APPL: \(apple) NASDAQ: \(nasdaq)")
1414
}
1515
```

0 commit comments

Comments
 (0)