From 739815f65d9f36b5694bdb382cc84813ca0054e9 Mon Sep 17 00:00:00 2001 From: Vikram Kriplaney Date: Mon, 28 Mar 2022 20:08:46 +0200 Subject: [PATCH] Fix zip example (#119) --- Guides/Zip.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Guides/Zip.md b/Guides/Zip.md index faedd09..b5fd047 100644 --- a/Guides/Zip.md +++ b/Guides/Zip.md @@ -6,10 +6,10 @@ Combines the latest values produced from two or more asynchronous sequences into an asynchronous sequence of tuples. ```swift -let appleFeed = URL("http://www.example.com/ticker?symbol=AAPL").lines -let nasdaqFeed = URL("http://www.example.com/ticker?symbol=^IXIC").lines +let appleFeed = URL(string: "http://www.example.com/ticker?symbol=AAPL")!.lines +let nasdaqFeed = URL(string: "http://www.example.com/ticker?symbol=^IXIC")!.lines -for try await (apple, nasdaq) = zip(appleFeed, nasdaqFeed) { +for try await (apple, nasdaq) in zip(appleFeed, nasdaqFeed) { print("APPL: \(apple) NASDAQ: \(nasdaq)") } ```