That's a good point, but it should be noted that all collections for which clojure.core/counted? returns true (they implement clojure.lang.Counted) should implement count in constant time. So the design of the Counted interface was clearly intended to provide consumers a soft guarantee of performance invariability across data structures when necessary..
On Thursday, April 21, 2016 at 1:26:26 PM UTC-4, Michael Gardner wrote: > > On Apr 21, 2016, at 10:04, James Reeves <ja...@booleanknot.com > <javascript:>> wrote: > > > > Clojure seems to avoid having functions that have variable performance > depending on the data structure they're applied to. > > But not always! (e.g. count) -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.