If sets don't have a set ordering, then why should seq on a set always return the same order for the same set?
If seq doesn't always return the a seq with the same order, then (nth set 5) might be different than a future call to (nth set 5), because the underlying sequence returned by the set might change. If seq on a set always returns a seq with the same order, then that may limit the future efficiency of sets. --Robert McIntyre On Sun, Dec 5, 2010 at 8:08 PM, Sunil S Nandihalli <sunil.nandiha...@gmail.com> wrote: > +1 to what Ken said > Sunil > > On Mon, Dec 6, 2010 at 4:04 AM, Ken Wesson <kwess...@gmail.com> wrote: >> >> On Sun, Dec 5, 2010 at 4:14 PM, jweiss <jeffrey.m.we...@gmail.com> wrote: >> > That's totally different than nth for a set being undefined. It's >> > undefined >> > on purpose. >> > >> > Now, if you are using a sorted-set, then you have a point there, I >> > would expect that nth means something then. But yeah, clojure doesn't >> > let you call nth on it directly, you have to make a seq out of it >> > first. >> >> I vote to make nth work on sets and maps, in general, sorted and >> otherwise, with the well-defined semantics of (identical? (nth >> set-or-map) (nth (seq (set-or-map)))). More generally, let nth work on >> anything that seq works on, by calling seq on its argument when >> necessary. >> >> -- >> 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 -- 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