 (defn rope->string
   "Flat string from Rope at root"
   [root]
-  (->> (rope-seq root) (filter string?) (reduce str)))
+  (apply str (->> (rope-seq root) (filter string?))))
 
 (defn rebalance
   "Create rebalanced copy of the Rope, using the algorithm described in \"Ropes: an Alternative to Strings\".

              (if (<= weight l-index)
                (recur (zip/right next) (- l-index weight))
                (recur next l-index)))
            :default (throw (IndexOutOfBoundsException. (str "String index out of range: " index)))))))

(defn rope-seq
  "Lazy sequence of all Rope nodes at root, depth-first order"

            [clojure.core :as core])
  (:import [clojure.lang Counted Indexed]
           [java.lang String IndexOutOfBoundsException]))

(doseq [fun ['concat 'subs]] (ns-unmap *ns* fun))

(def *fib-seq* (map first (iterate (fn [[a b]] [b (+ a b)]) [0 1])))
(def *leaf-cutoff-length* 128) ; TODO make constant in clojure 1.3
