I am using Clojure 1.4.0. It seems that reduce-kv does not work together 
with subvec.

For example:

(reduce-kv (fn [v index u] (+ v (* index u))) [10 3 5])

results in 13, but 

(reduce-kv (fn [v index u] (+ v (* index u))) 0 (subvec [11 10 3 5] 1 3))

yields the following exception:

No implementation of method: :kv-reduce of protocol: 
#'clojure.core.protocols/IKVReduce found for class: 
clojure.lang.APersistentVector$SubVector
  [Thrown class java.lang.IllegalArgumentException]

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to