 (declare red-node?)
 (declare black-node?)
 
+(declare make-red-node)
 (declare make-sorted-red-node)
-(declare make-sorted-red-node-val)
 (declare make-sorted-red-branch)
-(declare make-sorted-red-branch-val)
-
+
+(declare make-black-node)
 (declare make-sorted-black-node)
-(declare make-sorted-black-node-val)
 (declare make-sorted-black-branch)
-(declare make-sorted-black-branch-val)
-
-(declare make-black-node)
-(declare make-red-node)
 
 (declare make-sorted-map)
 

  (-blacken [this] this)
  (-redden [this]
    (make-sorted-red-branch -map-entry -left-node -right-node))
  (-replace [this entry left right]
    (make-black-node entry left right)))

(deftype SortedBlackBranchVal ^{:private true}
  [-map-entry -left-node -right-node]

  SortedNode
  (-color [this] :black)
  (-entry [this] -map-entry)
  (-left [this] -left-node)
  (-right [this] -right-node)
  (-add-left [this node]
    (-balance-left node this))
  (-add-right [this node]
    (-balance-right node this))
  (-remove-left [this node]
    (balance-left-del -map-entry node -right-node))
  (-remove-right [this node]
    (balance-right-del -map-entry -left-node node))
  (-balance-left [this node]
    (make-black-node (-entry node) this (-right node)))
  (-balance-right [this node]
    (make-black-node (-entry node) (-left node) this))
  (-blacken [this] this)
  (-redden [this]
    (make-sorted-red-branch-val -map-entry -left-node -right-node))
  (-replace [this entry left right]
    (make-black-node entry left right)))


  (-replace [this entry left right]
    (make-red-node entry left right)))

(deftype SortedRedBranch ^{:private true}
  [-map-entry -left-node -right-node]

  SortedNode
