have params-paramspath helper automatically compile the path, refactor filterer

This commit is contained in:
Nathan Marz 2015-09-10 17:12:54 -04:00
parent efd4f2ee9a
commit 3187cdad34
2 changed files with 2 additions and 2 deletions

View file

@ -162,7 +162,7 @@
(defn codewalker [afn] (i/->CodeWalkerStructurePath afn)) (defn codewalker [afn] (i/->CodeWalkerStructurePath afn))
(defn filterer [& path] (defn filterer [& path]
(params-paramspath [late (i/comp-paths* path)] (params-paramspath [late path]
(select* [this structure next-fn] (select* [this structure next-fn]
(->> structure (filter #(i/selected?* late %)) doall next-fn)) (->> structure (filter #(i/selected?* late %)) doall next-fn))
(transform* [this structure next-fn] (transform* [this structure next-fn]

View file

@ -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) offset-decls (mapcat (fn [b] [(:offset-sym b) (:offset b)]) bindings)
needed-params (map (fn [b] `(num-needed-params ~(:path-sym b))) bindings) needed-params (map (fn [b] `(num-needed-params ~(:path-sym b))) bindings)
latefn-decls (mapcat latefn-decls (mapcat