From d7ee2f7c6a2c929c89dce3e7acb703afa7cdd98b Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Thu, 19 Oct 2017 10:42:13 -0400 Subject: [PATCH] Move regex* location to a better spot. ...since it is no longer a "defrichnav." --- src/clj/com/rpl/specter/navs.cljc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/clj/com/rpl/specter/navs.cljc b/src/clj/com/rpl/specter/navs.cljc index 0f0069c..a5fce3b 100644 --- a/src/clj/com/rpl/specter/navs.cljc +++ b/src/clj/com/rpl/specter/navs.cljc @@ -478,6 +478,13 @@ structure (updater structure next-fn)))) +(defnav regex* [re] + (select* [this structure next-fn] + (doseqres NONE [s (re-seq re structure)] + (next-fn s))) + (transform* [this structure next-fn] + (clojure.string/replace structure re next-fn))) + (defn- update-first-list [l afn] (let [newf (afn (first l)) restl (rest l)] @@ -622,12 +629,6 @@ (do-keypath-transform vals structure key next-fn) )) -(defnav regex* [re] - (select* [this structure next-fn] - (doseqres NONE [s (re-seq re structure)] - (next-fn s))) - (transform* [this structure next-fn] - (clojure.string/replace structure re next-fn))) (defrichnav ^{:doc "Navigates to the key only if it exists in the map. Setting the value to NONE