 
 (declare BTSet Node LeafNode)
 
-(def ^:const ^number min-len 64)
-(def ^:const ^number max-len 128)
-(def ^:const ^number level-shift (->> (range 31 -1 -1)
+(def ^:const min-len 64)
+(def ^:const max-len 128)
+(def ^:const level-shift (->> (range 31 -1 -1)
                               (filter #(bit-test max-len %))
                               first
                               inc))
-(def ^:const ^number path-mask (dec (bit-shift-left 1 level-shift)))
-(def ^:const ^number empty-path 0)
+(def ^:const path-mask (dec (bit-shift-left 1 level-shift)))
+(def ^:const empty-path 0)
 (def ^:dynamic *cmp*)
 
-(defn ^number path-get [^number path
-                        ^number level]
+(defn path-get [path level]
   (bit-and path-mask
            (unsigned-bit-shift-right path level)))
 
-(defn ^number path-set [^number path
-                        ^number level
-                        ^number idx]
+(defn path-set [path level idx]
   (bit-or path 
           (bit-shift-left idx level)))
 
-(defn eq ^boolean [^number a
-                   ^number b]
+(defn eq [a b]
   (== 0 (*cmp* a b)))
 
-(defn ^number half [^number x]
+(defn half [x]
   (fix (/ x 2)))
 
-(defn ^number binary-search [^array arr ^number l ^number r k]
+(defn binary-search [arr l r k]
   (if (<= l r)
     (let [m   (half (+ l r))
           mk  (aget arr m)
-          cmp ^number (*cmp* mk k)]
+          cmp (*cmp* mk k)]
       (cond
         (neg? cmp) (recur arr (inc m) r k)
         (pos? cmp) (recur arr l (dec m) k)
         :else m))
     l))
     
-(defn ^number lookup-exact [^array arr key]
+(defn lookup-exact [arr key]
   (let [arr-l (alength arr)
         idx   (binary-search arr 0 (dec arr-l) key)]
     (if (and (< idx arr-l)

      idx
      -1)))

(defn ^number lookup-range [^array arr key]
  (let [arr-l (alength arr)
        idx   (binary-search arr 0 (dec arr-l) key)]
    (if (== idx arr-l)
      -1
      idx)))

(defn ^number lookup-insert-leaf [^array arr key]
  (binary-search arr 0 (- (alength arr) 1) key))

(defn ^number lookup-insert-node [^array arr key]
  (binary-search arr 0 (- (alength arr) 2) key))

(defn ^number -seek [set key]
  (loop [node  (.-root set)
         path  empty-path
         level (.-shift set)]

    new-arr))

(defn cut
  ([arr cut-from]
    (.slice arr cut-from))
  ([arr cut-from cut-to]
    (.slice arr cut-from cut-to)))

(defn splice [arr splice-from splice-to xs]
  (cut-n-splice arr 0 (alength arr) splice-from splice-to xs))

(defn insert [arr idx xs]
  (cut-n-splice arr 0 (alength arr) idx idx xs))

(defn merge-n-split [a1 a2]
  (let [a1-l    (alength a1)
        a2-l    (alength a2)
        total-l (+ a1-l a2-l)
