From eab858255456bc4c3be0229cf852d91720ac3361 Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Tue, 23 Oct 2018 18:08:08 +0530 Subject: [PATCH] [Swift 4.2] Updated Linear Search The code worked fine in Xcode 10. I removed code snippet at the top of playground file. --- Linear Search/LinearSearch.playground/Contents.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Linear Search/LinearSearch.playground/Contents.swift b/Linear Search/LinearSearch.playground/Contents.swift index 8ac0e9a71..8c616ded4 100644 --- a/Linear Search/LinearSearch.playground/Contents.swift +++ b/Linear Search/LinearSearch.playground/Contents.swift @@ -1,10 +1,5 @@ //: Playground - noun: a place where people can play -// last checked with Xcode 9.0b4 -#if swift(>=4.0) -print("Hello, Swift 4!") -#endif - func linearSearch(_ array: [T], _ object: T) -> Int? { for (index, obj) in array.enumerated() where obj == object { return index