2018-08-24 18:42:07 +02:00
|
|
|
/**
|
|
|
|
* Splash
|
|
|
|
* Copyright (c) John Sundell 2018
|
|
|
|
* MIT license - see LICENSE.md
|
|
|
|
*/
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
extension Equatable {
|
|
|
|
func isAny(of candidates: Self...) -> Bool {
|
|
|
|
return candidates.contains(self)
|
|
|
|
}
|
|
|
|
|
2018-08-27 00:10:08 +02:00
|
|
|
func isAny<S: Sequence>(of candidates: S) -> Bool where S.Element == Self {
|
2018-08-24 18:42:07 +02:00
|
|
|
return candidates.contains(self)
|
|
|
|
}
|
|
|
|
}
|