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
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue