From 3187cdad3452d38b19b2a0e2a0d9382f30e9ca33 Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Thu, 10 Sep 2015 17:12:54 -0400 Subject: [PATCH] have params-paramspath helper automatically compile the path, refactor filterer --- src/com/rpl/specter.cljc | 2 +- src/com/rpl/specter/impl.cljc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/rpl/specter.cljc b/src/com/rpl/specter.cljc index 59ed753..2863f48 100644 --- a/src/com/rpl/specter.cljc +++ b/src/com/rpl/specter.cljc @@ -162,7 +162,7 @@ (defn codewalker [afn] (i/->CodeWalkerStructurePath afn)) (defn filterer [& path] - (params-paramspath [late (i/comp-paths* path)] + (params-paramspath [late path] (select* [this structure next-fn] (->> structure (filter #(i/selected?* late %)) doall next-fn)) (transform* [this structure next-fn] diff --git a/src/com/rpl/specter/impl.cljc b/src/com/rpl/specter/impl.cljc index 79c3e98..101da23 100644 --- a/src/com/rpl/specter/impl.cljc +++ b/src/com/rpl/specter/impl.cljc @@ -381,7 +381,7 @@ )) ))) [])) - binding-decls (mapcat (fn [b] [(:path-sym b) (:path b)]) bindings) + binding-decls (mapcat (fn [b] [(:path-sym b) `(comp-paths* ~(:path b))]) bindings) offset-decls (mapcat (fn [b] [(:offset-sym b) (:offset b)]) bindings) needed-params (map (fn [b] `(num-needed-params ~(:path-sym b))) bindings) latefn-decls (mapcat