From 89a1d1f2af629a3295403de6f240922b2c959845 Mon Sep 17 00:00:00 2001 From: Nolan Waite Date: Thu, 25 May 2017 22:57:42 -0300 Subject: [PATCH] Finish playground execution after retrieving the result. Just learned this was a thing you could do! --- HTMLReader.playground/Contents.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HTMLReader.playground/Contents.swift b/HTMLReader.playground/Contents.swift index d954fc4..01dd6d1 100644 --- a/HTMLReader.playground/Contents.swift +++ b/HTMLReader.playground/Contents.swift @@ -26,8 +26,8 @@ URLSession.shared.dataTask(with: URL(string: homepage)!) { (data, response, erro } print(div.textContent.trimmingCharacters(in: .whitespacesAndNewlines)) - - + + PlaygroundPage.current.finishExecution() }.resume() PlaygroundPage.current.needsIndefiniteExecution = true