   (let [paths (indexes node limb)]
     (if (some nil? paths)
       nil
-      (loop [paths paths,
-             node node,
+      (loop [[head & tail] paths,
+             {:keys [children] :as node} node,
              acc (if (:element node) 1 0)]
-        (let [head (first paths), tail (next paths)
-              {:keys [children]} node]
-          (if head
-            (recur tail
-                   (nth children head)
-                   (+ acc (left-to-right head node)))
-            (dec acc))))))) ;zero-based index
+        (if head
+          (recur tail
+                 (nth children head)
+                 (+ acc (left-to-right head node)))
+          (dec acc)))))) ;zero-based index
 
 (defn indexes
   "returns a vector of numbers for each level that the index of a limb is

                (= (count children) 0))
          (conj path index)
          (recur (conj path index)
                 (get-in node [:children index])
                 (get-in limb [:children 0])))))))

(defn crawl-to
  "returns a zipper with it's location where the index in a node"

(defn find-in [xs n]
  (.indexOf xs n))

(defrecord Node [triple element sub-counter children])

(defn count-elements
  [{:keys [sub-counter element]}]
  (if element
    (inc sub-counter)
    sub-counter))

(defn count-children
  [children]
  (reduce + (map count-elements children)))

(defn node-zip
  [root]
  (z/zipper
    (fn [node] (:children node))
    (fn [node] (seq (:children node)))
    (fn [{:keys [triple element]} children]
      (->Node triple
              element
              (count-children children)
              (sorted :triple children)))
    root))

(defn node
  [[triple & xs] element]
