Just curious why something like the following wouldn't be part of subvector?
public Object kvreduce(IFn f, Object init){ for(int i=0;i<(end - start);i++){ init = f.invoke(init,i,v.nth(start+i)); return init; } On Fri, Dec 28, 2012 at 11:23 PM, Andy Fingerhut <andy.finger...@gmail.com>wrote: > I am not saying that one would *have* to give up O(1) subvec in order to > support other operations. > > I am guessing, without having done a thorough analysis, that an O(log n) > subvec based on RRB Trees would make most/all operations on subvec's just > fall out fairly naturally, rather than having to be written as special > cases. > > Andy > > On Dec 27, 2012, at 8:54 PM, Alan Busby wrote: > > I'm confused why we'd need to give up O(1) just to support something like > reduce-kv on subvectors. > Isn't the implementation of subvector just a wrapper around the original > vector along with a start and end value? > > Current source here; > > https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/APersistentVector.java > > I apologize if I'm missing something key here. > > > On Fri, Dec 28, 2012 at 3:18 AM, Andy Fingerhut > <andy.finger...@gmail.com>wrote: > >> http://dev.clojure.org/jira/browse/CLJ-1082 > > -- > 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 > -- 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