make terminal-val return a direct-nav, add another benchmark case

This commit is contained in:
Nathan Marz 2016-09-02 20:20:49 -04:00
parent 194396f0f4
commit 16446373f1
3 changed files with 4 additions and 4 deletions

View file

@ -69,6 +69,7 @@
(compiled-select-any p data) (compiled-select-any p data)
(specter-dynamic-nested-get data :a :b :c) (specter-dynamic-nested-get data :a :b :c)
(get-in data [:a :b :c]) (get-in data [:a :b :c])
(-> data (get :a) (get :b) (get :c))
(-> data :a :b :c) (-> data :a :b :c)
(select-any [(keypath :a) (keypath :b) (keypath :c)] data))) (select-any [(keypath :a) (keypath :b) (keypath :c)] data)))

View file

@ -194,7 +194,7 @@
(i/terminal* afn vals structure)))) (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 "Like `terminal` but specifies a val to set at the location regardless of
the collected values or the value at the location." the collected values or the value at the location."
[v] [v]

View file

@ -672,12 +672,11 @@
o)) o))
(declare resolve-magic-code)
(defn all-static? [params] (defn all-static? [params]
(every? (complement dynamic-param?) params)) (every? (complement dynamic-param?) params))
(declare resolve-magic-code)
(defn resolve-dynamic-fn-arg [o] (defn resolve-dynamic-fn-arg [o]
(cond (instance? DynamicFunction o) (cond (instance? DynamicFunction o)
(let [op (resolve-dynamic-fn-arg (:op o)) (let [op (resolve-dynamic-fn-arg (:op o))