                      [(subvec msgs 0 negative-binsearch-result) ;not found, exclusive
                       (subvec msgs negative-binsearch-result)]
                      [(subvec msgs 0 (inc binsearch-result)) ;found, inclusive
-                      (subvec (inc binsearch-result))])
+                      (subvec msgs (inc binsearch-result))])
 
                    on-the-last-child? (empty? children)
 

                 (recur children (conj rebuilt-children new-child) extra-msgs)))))))))

(defn insert
  (tree key)
  (enqueue tree [(->InsertOp key)]))

(clojure.pprint/pprint
  (-> (apply core/b-tree (range 30))

(defprotocol IOperation
  (affects-key [op] "Which key this affects--currently must be a single key")
  (apply-op [op tree] "Applies the operation to the tree"))

(defrecord InsertOp [key]
  IOperation
