improve execution of kws
This commit is contained in:
parent
e0bde53fef
commit
cd994b10ee
1 changed files with 4 additions and 5 deletions
|
|
@ -159,11 +159,10 @@
|
||||||
|
|
||||||
(extend-type clojure.lang.Keyword
|
(extend-type clojure.lang.Keyword
|
||||||
StructurePath
|
StructurePath
|
||||||
;; faster to invoke keyword directly on structure rather than reuse key-select and key-update functions
|
(select* [kw structure next-fn]
|
||||||
(select* [^clojure.lang.Keyword kw structure next-fn]
|
(next-fn (get structure kw)))
|
||||||
(next-fn (kw structure)))
|
(update* [kw structure next-fn]
|
||||||
(update* [^clojure.lang.Keyword kw structure next-fn]
|
(assoc structure kw (next-fn (get structure kw)))
|
||||||
(assoc structure kw (next-fn (kw structure)))
|
|
||||||
))
|
))
|
||||||
|
|
||||||
(extend-type clojure.lang.AFn
|
(extend-type clojure.lang.AFn
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue