This commit is contained in:
Nathan Marz 2015-05-11 15:08:51 -04:00
parent 085dc1d333
commit 6e440d235c
2 changed files with 3 additions and 2 deletions

View file

@ -111,8 +111,8 @@ Finally, you can make `select` and `update` work much faster by precompiling you
```clojure
(def precompiled (comp-paths ALL :a even?))
(update [ALL :a even?] structure)
(update precompiled structure)
(update [ALL :a even?] inc structure)
(update precompiled inc structure)
```
Some more examples:

View file

@ -86,6 +86,7 @@
(defn structure-path-impl [this]
(if (fn? this)
;;TODO: this isn't kosher, it uses knowledge of internals of protocols
(-> StructurePath :impls (get clojure.lang.AFn))
(find-protocol-impl! StructurePath this)))