Question: I understand from my recent use of PHP-PDO over the last few months that you can do a PREPARE statement and then run the query. In fact I can see the usefulness of this if I'm going to either SELECT on a complex join, varying the where conditions, a repeated number of times.

Or, similarly, if I was wanting to insert multiple records.

However, if I know I only want to run a statement once, shouldn't I just EXECUTE the query? I'm basically querying the database twice.

Answer: 
So I think creating a Set with an array is a terrible idea - O(n) is the time complexity of that set. 

I have put together a nice Set that uses a dictionary: <https://github.com/evilpenguin/Swift-Stuff/blob/master/Set.swift>
Special case for classes derived from NSObject

given that default Equitable (& Hashable) conformance in NSObject is basically trash you'd better make sure you provide a proper 

```
static func == (lhs: YourClassDerivedFromNSObject, rhs: YourClassDerivedFromNSObject) -> Bool {

```

implementation lest you want plucking the duplicates inserted into
Set