We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a31bd41 commit eab8582Copy full SHA for eab8582
Linear Search/LinearSearch.playground/Contents.swift
@@ -1,10 +1,5 @@
1
//: Playground - noun: a place where people can play
2
3
-// last checked with Xcode 9.0b4
4
-#if swift(>=4.0)
5
-print("Hello, Swift 4!")
6
-#endif
7
-
8
func linearSearch<T: Equatable>(_ array: [T], _ object: T) -> Int? {
9
for (index, obj) in array.enumerated() where obj == object {
10
return index
0 commit comments