diff --git a/scripts/benchmarks.clj b/scripts/benchmarks.clj index 244aa5c..0e035f0 100644 --- a/scripts/benchmarks.clj +++ b/scripts/benchmarks.clj @@ -69,6 +69,7 @@ (compiled-select-any p data) (specter-dynamic-nested-get data :a :b :c) (get-in data [:a :b :c]) + (-> data (get :a) (get :b) (get :c)) (-> data :a :b :c) (select-any [(keypath :a) (keypath :b) (keypath :c)] data))) diff --git a/src/clj/com/rpl/specter.cljc b/src/clj/com/rpl/specter.cljc index b22591b..8353e02 100644 --- a/src/clj/com/rpl/specter.cljc +++ b/src/clj/com/rpl/specter.cljc @@ -194,7 +194,7 @@ (i/terminal* afn vals structure)))) -(defn terminal-val +(defn ^:direct-nav terminal-val "Like `terminal` but specifies a val to set at the location regardless of the collected values or the value at the location." [v] diff --git a/src/clj/com/rpl/specter/impl.cljc b/src/clj/com/rpl/specter/impl.cljc index a17ce90..b27f561 100644 --- a/src/clj/com/rpl/specter/impl.cljc +++ b/src/clj/com/rpl/specter/impl.cljc @@ -672,12 +672,11 @@ o)) - -(declare resolve-magic-code) - (defn all-static? [params] (every? (complement dynamic-param?) params)) +(declare resolve-magic-code) + (defn resolve-dynamic-fn-arg [o] (cond (instance? DynamicFunction o) (let [op (resolve-dynamic-fn-arg (:op o))