Guest User

Untitled

a guest
Jun 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. public extension Equatable {
  2. func isOne(of others: Self...) -> Bool {
  3. return isOne(of: others)
  4. }
  5.  
  6. func isOne<T: Collection>(of others: T) -> Bool where T.Element == Self {
  7. return others.contains(self)
  8. }
  9. }
Add Comment
Please, Sign In to add comment