   (let [dsx (.clone ds)]
     (do (.setVDefaultToOne dsx true) (.curvature2D dsx))))
 
-(defn syms-for [ds]
-  (filter #(-> %1 .curvature2D .isZero)
-          (lazy-seq (new DefineBranching2d ds 3 2 Whole/ZERO))))
-
 (def template
   (new DSymbol (str "1.1:60:"
                     "2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 "


(def boundary-mappings
  (let [template-boundary (boundary-chambers template (Integer. 1) 0 1 2)
        octagon-boundary (cycle (map #(Integer. %1) (range 1 17)))
        mapping #(zipmap (drop (mod (- 19 %1) 16) octagon-boundary)
                         (take 16 template-boundary))]
    (map mapping (range 1 16 2))))

(defn apply-to-template [ds oct2tmp]
  (let [tmp2oct (clojure.set/map-invert oct2tmp)


(defn iterate-cycle [coll x]
  (reductions #(%2 %1) x (cycle coll)))

(defn walk [ds D & idxs]
  (reduce #(.op ds %2 %1) D idxs))
