 
 import Foundation
 
-struct OrderedSet<T: Hashable> {
-  var indexByElement: [T: Int]
-  var contents: Array<T>
+struct OrderedSet<T: Hashable>: ArrayLiteralConvertible {
+  private var indexByElement: [T: Int] = [:]
+  private var elements: Array<T> = []
+
   var count: Int {
-    return contents.count
+    return elements.count
   }
 
-  init() {
-    indexByElement = [:]
-    contents = []
-  }
-
-  subscript(index: Int) -> T {
-    return contents[index]
+  init(arrayLiteral elements: T...) {
+    for element in elements {
+      append(element)
+    }
   }
 
   mutating func append(element: T) {

      return
    }

    indexByElement[element] = contents.count
    contents.append(element)
  }

  mutating func remove(element: T) -> Bool {

    }

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

    return true
  }
