This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-26
Channels
- # beginners (5)
- # cider (4)
- # clojure (60)
- # clojure-austin (1)
- # clojure-berlin (1)
- # clojure-dev (6)
- # clojure-italy (5)
- # clojure-spec (2)
- # clojure-uk (2)
- # clojurescript (13)
- # community-development (17)
- # cursive (5)
- # datomic (11)
- # fulcro (9)
- # hoplon (5)
- # jobs-rus (2)
- # om (1)
- # parinfer (1)
- # protorepl (15)
- # re-frame (10)
- # reagent (12)
- # sql (5)
- # unrepl (3)
user=> (def v [1 2 3 4 5])
#'user/v
user=> (def v2 (subvec v 1 3))
#'user/v2
user=> (reduce-kv (fn [r i e] ) nil v)
nil
user=> (reduce-kv (fn [r i e] ) nil v2)
IllegalArgumentException No implementation of method: :kv-reduce of protocol: #'clojure.core.protocols/IKVReduce found for class: clojure.lang.APersistentVector$SubVector clojure.core/-cache-protocol-fn (core_deftype.clj:568)
Is this behavior intended or would this be considered a bug?
seems like a bug to me. I worked on the subvec stuff a while back and can't think of any reason why it couldn't easily implement the reducy protocols
(or at worst fallback to a generic seq impl)
looks like there's already a ticket for this https://dev.clojure.org/jira/browse/CLJ-2065
oh I missed the kv
aspect of this. maybe there's no such thing as a seq fallback in that case