       return
     }
 
-    indexByElement[element] = contents.count
-    contents.append(element)
+    indexByElement[element] = elements.count
+    elements.append(element)
   }
 
   mutating func remove(element: T) -> Bool {

    }

    indexByElement[element] = nil
    contents.removeAtIndex(index)

    return true
  }


import Foundation

struct OrderedSet<T: Hashable>: ArrayLiteralConvertible {
  private var indexByElement: [T: Int] = [:]
  private var elements: Array<T> = []

  var count: Int {
    return elements.count
  }

  init(arrayLiteral elements: T...) {
    for element in elements {
      append(element)
    }
  }

  mutating func append(element: T) {
