 
 ;; Presumably faster than iterating till zip/end?
 (defn rope-conj
-  ([coll x]
-     (loop [zipper (rope-zip coll)]
+  "Conjoin for Ropes. x is concatenated to the depth-first end, i.e. rightmost node of the Rope.
+Additional xs will be concatenated first."
+  ([root x]
+     (loop [zipper (rope-zip root)]
        (let [left-child (zip/down zipper) right-child (zip/right left-child)]
          (cond (and right-child (rope? (zip/node right-child))) (recur right-child)
                (and left-child (rope? (zip/node left-child))) (recur left-child)
                :default (-> zipper (zip/edit #(rope-concat %1 %2) x) zip/root)))))
-  ([coll x & xs]
-     (rope-conj coll (reduce rope-concat x xs))))
-
-(defn- rope-split-at [coll index]
-  (let [[left-rope string right-rope] (rope-split coll (fn [weight _] (>= index weight)))
+  ([root x & xs]
+     (rope-conj root (reduce rope-concat x xs))))
+
+(defn- rope-split-at
+  "Split Rope at index, with the additional remaining string index as fourth vector element"
+  [root index]
+  (let [[left-rope string right-rope] (rope-split root (fn [weight _] (>= index weight)))
         position (- index (count left-rope))]
     [left-rope string right-rope position]))
 
-(defn rope-insert [coll index string]
-  (if (= index (count coll))
-    (rope-conj coll string)
-    (let [[left-rope target right-rope position] (rope-split-at coll index)]
+(defn rope-insert
+  "Insert string in Rope at index"
+  [root index string]
+  (if (= index (count root))
+    (rope-conj root string)
+    (let [[left-rope target right-rope position] (rope-split-at root index)]
       (rope-concat (rope-conj left-rope (subs target 0 position) string (subs target position))
                    right-rope))))
 
 (defn rope-subs
-  ([coll start]
-     (if (= start (count coll))
+  "Report in O(log n) time for Ropes, the equivalent of string subs"
+  ([root start]
+     (if (= start (count root))
        "" ; For consistency with "normal" subs
-       (let [[_ string right-rope position] (rope-split-at coll start)]
+       (let [[_ string right-rope position] (rope-split-at root start)]
          (str (subs string position) right-rope))))
-  ([coll start end]
+  ([root start end]
      {:pre [(>= (- end start) 0)]}
-     (if (= start (count coll))
+     (if (= start (count root))
        ""
-       (let [[_ part1 right-rope position1] (rope-split-at coll start)
+       (let [[_ part1 right-rope position1] (rope-split-at root start)
              length (- end start)
              rest (- (count part1) position1)]
          (if (> length rest)

  (charAt [this index] (nth this index))
  (length [this] (count this))
  (subSequence [this start end] (rope-subs this start end))
  (toString [this] (rope-str this))
  
  ;; ISeq
  ;; (first [_] left)
  ;; (more [this] (or (next this) (empty this)))
  ;; (next [this] (seq right))

  ;; Seqable
  ;; (seq [this] (when left this))

  ;; IPersistentCollection
  ;; (cons [this x] (rope x this))
  ;; (empty [_] (rope))
  ;; (equiv [this x] (= (str this) (str x)))

  ;; ITransientCollection
  ;; (conj [this x] (println "called") (rope-conj this x))
  ;; (persistent [this] this)
  )

(defmethod print-method Rope [rope writer]
  (print-simple (format "#<Rope %s>" (->> (measure rope) vals (join "/"))) writer))

      (rope-rebalance new-rope))))

(defn rope-split
  "Split Rope at root by calling pred against the accumulated weights and nodes traversed so far.
Pred should evaluate to a truthy value if the weight or node should be traversed
to the right, i.e. towards higher weights.
The vector retuned is composed of the re-evaluated tree to the left of the
split, the actual split leaf and a reassembled tree of the nodes cut off to the
right of the traversal."
  ([root pred] (rope-split root pred :length))
  ([root pred measure-key]
     (let [reassemble (fn [coll]
                        (if (empty? coll)
                          (rope)
                          (->> coll (reduce rope-concat) rope)))]
       (loop [acc (), zipper (rope-zip root), total-weight 0]
         (let [node (zip/node zipper), node-weight (-> node measure measure-key), new-weight (+ node-weight total-weight)]
           (if (string? node)
             (if (pred new-weight node)
