 
 (defmacro declarepath
   ([name]
-    `(declarepath ~name []))
+   `(declarepath ~name []))
   ([name params]
-    (let [platform (if (contains? &env :locals) :cljs :clj)
-          select-exec (if (= platform :clj)
-                        `i/exec-rich-select*
-                        `i/rich-select*)
-          transform-exec (if (= platform :clj)
-                           `i/exec-rich-transform*
-                           `i/rich-transform*)
-          num-params (count params)
-          declared (declared-name name)
-          rargs [(gensym "params") (gensym "pidx") (gensym "vals")
-                 (gensym "structure") (gensym "next-fn")]]
-      `(do
-         (declare ~declared)
-         (def ~name
-           (let [nav# (reify RichNavigator
-                        (~'rich-select* [this# ~@rargs]
-                          (~select-exec ~declared ~@rargs))
-                        (~'rich-transform* [this# ~@rargs]
-                          (~transform-exec ~declared ~@rargs)
-                          ))]
-             (if (= ~num-params 0)
-               (i/no-params-rich-compiled-path nav#)
-               (i/->ParamsNeededPath nav# ~num-params)
-               )))))))
+   (let [platform (if (contains? &env :locals) :cljs :clj)
+         select-exec (if (= platform :clj)
+                       `i/exec-rich-select*
+                       `i/rich-select*)
+         transform-exec (if (= platform :clj)
+                          `i/exec-rich-transform*
+                          `i/rich-transform*)
+         num-params (count params)
+         declared (declared-name name)
+         rargs [(gensym "params") (gensym "pidx") (gensym "vals")
+                (gensym "structure") (gensym "next-fn")]]
+     `(do
+        (declare ~declared)
+        (def ~name
+          (let [nav# (reify RichNavigator
+                       (~'rich-select* [this# ~@rargs]
+                         (~select-exec ~declared ~@rargs))
+                       (~'rich-transform* [this# ~@rargs]
+                         (~transform-exec ~declared ~@rargs)
+                         ))]
+            (if (= ~num-params 0)
+              (i/no-params-rich-compiled-path nav#)
+              (i/->ParamsNeededPath nav# ~num-params)
+              )))))))
 
 (defmacro providepath [name apath]
   `(let [comped# (i/comp-paths-internalized ~apath)


(defmacro defpathedfn
  "Defines a higher order navigator that itself takes in one or more paths
   as input. This macro is generally used in conjunction with [[fixed-pathed-nav]]
   or [[variable-pathed-nav]]. When inline factoring is applied to a path containing
   one of these higher order navigators, it will automatically interepret all 
   arguments as paths, factor them accordingly, and set up the callsite to 
   provide the parameters dynamically. Use ^:notpath metadata on arguments 
   to indicate non-path arguments that should not be factored – note that in order
   to be inline factorable, these arguments must be statically resolvable (e.g. a 
   top level var). See `transformed` for an example."
  [name & args]
  (let [[name args] (name-with-attributes name args)
        name (vary-meta name assoc :pathedfn true)]

  (:use [com.rpl.specter.protocols :only [Navigator]]
        [com.rpl.specter.impl :only [RichNavigator]])
  (:require [com.rpl.specter.impl :as i]
            [clojure.walk :as cljwalk]
            [com.rpl.specter.defnavhelpers :as dnh])
  )

(defn ^:no-doc gensyms [amt]
