diff --git a/README.md b/README.md index 3939c6e..78289f5 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/src/clj/com/rpl/specter/impl.clj b/src/clj/com/rpl/specter/impl.clj index 9ba248d..7e971af 100644 --- a/src/clj/com/rpl/specter/impl.clj +++ b/src/clj/com/rpl/specter/impl.clj @@ -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)))