From cd994b10ee36aeca6906a6a5e439ce41f2110480 Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Mon, 11 May 2015 14:02:08 -0400 Subject: [PATCH] improve execution of kws --- src/clj/com/rpl/specter.clj | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/clj/com/rpl/specter.clj b/src/clj/com/rpl/specter.clj index 06fceed..a89fc23 100644 --- a/src/clj/com/rpl/specter.clj +++ b/src/clj/com/rpl/specter.clj @@ -159,11 +159,10 @@ (extend-type clojure.lang.Keyword StructurePath - ;; faster to invoke keyword directly on structure rather than reuse key-select and key-update functions - (select* [^clojure.lang.Keyword kw structure next-fn] - (next-fn (kw structure))) - (update* [^clojure.lang.Keyword kw structure next-fn] - (assoc structure kw (next-fn (kw structure))) + (select* [kw structure next-fn] + (next-fn (get structure kw))) + (update* [kw structure next-fn] + (assoc structure kw (next-fn (get structure kw))) )) (extend-type clojure.lang.AFn