From efbc84a7cdfe979cda9ce2c09a8a05612bb87112 Mon Sep 17 00:00:00 2001 From: Benjamin Hendricks Date: Tue, 25 Jul 2017 18:41:47 +0100 Subject: [PATCH] add ifdef --- Two-Sum Problem/Solution 1/2Sum.playground/Contents.swift | 3 +++ Two-Sum Problem/Solution 2/2Sum.playground/Contents.swift | 3 +++ .../Solution 2/2Sum.playground/timeline.xctimeline | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 Two-Sum Problem/Solution 2/2Sum.playground/timeline.xctimeline diff --git a/Two-Sum Problem/Solution 1/2Sum.playground/Contents.swift b/Two-Sum Problem/Solution 1/2Sum.playground/Contents.swift index 9cc83c5ed..4de46128c 100644 --- a/Two-Sum Problem/Solution 1/2Sum.playground/Contents.swift +++ b/Two-Sum Problem/Solution 1/2Sum.playground/Contents.swift @@ -1,5 +1,8 @@ //: Playground - noun: a place where people can play // Last checked with: Version 9.0 beta 4 (9M189t) +#if swift(>=4.0) +print("Hello, Swift 4!") +#endif func twoSumProblem(_ a: [Int], k: Int) -> ((Int, Int))? { var map = [Int: Int]() diff --git a/Two-Sum Problem/Solution 2/2Sum.playground/Contents.swift b/Two-Sum Problem/Solution 2/2Sum.playground/Contents.swift index b740dd3e6..4cb3d9283 100644 --- a/Two-Sum Problem/Solution 2/2Sum.playground/Contents.swift +++ b/Two-Sum Problem/Solution 2/2Sum.playground/Contents.swift @@ -1,5 +1,8 @@ //: Playground - noun: a place where people can play // Last checked with: Version 9.0 beta 4 (9M189t) +#if swift(>=4.0) +print("Hello, Swift 4!") +#endif func twoSumProblem(_ a: [Int], k: Int) -> ((Int, Int))? { var i = 0 diff --git a/Two-Sum Problem/Solution 2/2Sum.playground/timeline.xctimeline b/Two-Sum Problem/Solution 2/2Sum.playground/timeline.xctimeline deleted file mode 100644 index bf468afec..000000000 --- a/Two-Sum Problem/Solution 2/2Sum.playground/timeline.xctimeline +++ /dev/null @@ -1,6 +0,0 @@ - - - - -