improve execution of kws

This commit is contained in:
Nathan Marz 2015-05-11 14:02:08 -04:00
parent e0bde53fef
commit cd994b10ee

View file

@ -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