    :name (str "pedal" n)
    :distributor true})
 
+(defn distributor-pedals [n]
+  (for [i (range 1 (inc n))]
+    (distributor-pedal i)))
+
 (defn isolator-pedal [n]
   {:type :pedal
    :name (str "pedal" n)
    :distributor true
    :isolator true})
+
+(defn isolator-pedals
+  ([n] (isolator-pedals 1 n))
+  ([from to] (for [i (range from (inc to))]
+               (isolator-pedal i))))
 
 (deftest simplify
   (is (= {:power :distributor :name "pedal1"} (ptree/simplify (distributor-pedal 1))))


(deftest build
  (is (eql-zip [:distributor [:pedal "pedal1"] [:pedal "pedal2"] [:pedal "pedal3"] [:pedal "pedal4"] [:pedal "pedal5"] [:pedal "pedal6"]]
               (ptree/build (for [n (range 1 7)] (distributor-pedal n)))))
  (is (eql-zip [:distributor [:pedal "pedal1"] [:pedal "pedal2"] [:pedal "pedal3"] [:pedal "pedal4"] [:pedal "pedal5"] [:distributor [:pedal "pedal6"] [:pedal "pedal7"]]]
               (ptree/build (for [n (range 1 8)] (distributor-pedal n)))))
  (is (eql-zip [:distributor [:pedal "pedal1"] [:pedal "pedal2"] [:isolator [:pedal "pedal3"] [:pedal "pedal4"]]]
               (ptree/build [(distributor-pedal 1) (distributor-pedal 2) (isolator-pedal 3) (isolator-pedal 4)]))))

            [clojure.zip :as zip]
            [gigrig.powertree :as ptree]))

;; HELPERS
;; =======
(defn echo [arg]
  (.log js/console arg)
  arg)
