diff --git a/src/clj/com/rpl/specter/impl.cljc b/src/clj/com/rpl/specter/impl.cljc index aea582a..1e255e7 100644 --- a/src/clj/com/rpl/specter/impl.cljc +++ b/src/clj/com/rpl/specter/impl.cljc @@ -604,7 +604,9 @@ (defn- magic-precompilation* [o] (cond (sequential? o) - (flatten (map magic-precompilation* o)) + (if (list? o) + (map magic-precompilation* o) + (into (empty o) (map magic-precompilation* o))) (instance? VarUse o) (if (dynamic-var? (:var o)) diff --git a/test/com/rpl/specter/core_test.cljc b/test/com/rpl/specter/core_test.cljc index 2e23cc5..aa51079 100644 --- a/test/com/rpl/specter/core_test.cljc +++ b/test/com/rpl/specter/core_test.cljc @@ -1302,3 +1302,6 @@ (let [res (setval [s/ALL s/FIRST] "a" {:a 1 :b 2})] (is (= {"a" 2} res)) (is (= 1 (count res))))) + +(deftest inline-caching-vector-params-test + (is (= [10 [11]] (multi-transform (s/terminal-val [10 [11]]) :a))))