diff --git a/src/clj/com/rpl/specter.clj b/src/clj/com/rpl/specter.clj index 6b2239d..e7dbd94 100644 --- a/src/clj/com/rpl/specter.clj +++ b/src/clj/com/rpl/specter.clj @@ -153,7 +153,7 @@ e.g. (selected? :vals ALL even?) keeps the current element only if an even number exists for the :vals key" [& selectors] - (let [s (comp-paths selectors)] + (let [s (comp-paths* selectors)] (fn [structure] (->> structure (select s) diff --git a/src/clj/com/rpl/specter/impl.clj b/src/clj/com/rpl/specter/impl.clj index 92383fe..900c3be 100644 --- a/src/clj/com/rpl/specter/impl.clj +++ b/src/clj/com/rpl/specter/impl.clj @@ -97,17 +97,17 @@ updater (.updater sp)] (->StructureValsPathFunctions (fn [vals structure next-fn] - (selector vals structure + (curr-selector vals structure (fn [vals-next structure-next] - (curr-selector vals-next structure-next next-fn) + (selector vals-next structure-next next-fn) ))) (fn [vals structure next-fn] - (updater vals structure + (curr-updater vals structure (fn [vals-next structure-next] - (curr-updater vals-next structure-next next-fn) + (updater vals-next structure-next next-fn) ))) ))) - (->> structure-paths flatten (map coerce-path) reverse)) + (map coerce-path structure-paths)) )) ;; cell implementation idea taken from prismatic schema library