refactor and cleanup [skip ci]

This commit is contained in:
overtake
2019-11-01 17:11:12 +04:00
parent 66191348f3
commit 8f66c10ac1
786 changed files with 983 additions and 69155 deletions

View File

@@ -0,0 +1,23 @@
import Foundation
public struct SimpleSet<T: Equatable> {
private var items: [T] = []
public init() {
}
public mutating func insert(_ item: T) {
if !self.contains(item) {
self.items.append(item)
}
}
public func contains(_ item: T) -> Bool {
for currentItem in self.items {
if currentItem == item {
return true
}
}
return false
}
}