 (defn ordered-index [keyfn compfn]
   (BinaryIndex. keyfn compfn #js []))
 
+
 ;; A native, indexed, mutable/transactional store
 ;; - Always performs a merging upsert
 ;; - Secondary index doesn't index objects for key-fn -> nil

  (-lookup [store val]
    (-lookup store val nil))
  (-lookup [store id not-found]
    (-lookup (.-root store) id not-found))

  ICounted
  (-count [store] (-count (.-root store)))

  IFn
  (-invoke [store k]

  (-lookup [idx val]
    (-lookup idx val nil))
  (-lookup [idx val not-found]
    (let [index (goog.array.binarySearch arry val #(compfn %1 (keyfn %2)))]
      (if (>= index 0)
        (loop [end index]
          (if (= (compfn val (keyfn (aget arry end))) 0)
