Skip to content

Instantly share code, notes, and snippets.

@ivangodfather
Created September 24, 2015 20:20
Show Gist options
  • Select an option

  • Save ivangodfather/3795d5d08a1b51a4f556 to your computer and use it in GitHub Desktop.

Select an option

Save ivangodfather/3795d5d08a1b51a4f556 to your computer and use it in GitHub Desktop.
class Product: Equatable {
var id: Int?
}
func ==(lhs: Product, rhs: Product) -> Bool {
return lhs.id == rhs.id
}
var myProducts = [//Array with products with some products repetaed ]
var uniqueIdProducts = ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment