Thanks ken for your response .. I think I completely misrepresented my
question in my previous email . What i want to know is suppose I have two
sets  s1,s2 and
(= s1 s2)

returns true which means I can definitely find pairs of values v1 from s1
and v2 from s2 where
(= v1 v2)
would be true. Now my question is if I do a seq on both the sets s1 and s2
would I be right in assuming that the ordering of the elements is identical
or would even
(identical? v1 v2)
have to be true to have any guarantees on the orderings of the two seqs
being the same...

Thanks,
Sunil

On Wed, Dec 1, 2010 at 11:15 AM, Ken Wesson <[email protected]> wrote:

> On Wed, Dec 1, 2010 at 12:35 AM, Sunil S Nandihalli
> <[email protected]> wrote:
> > Hello everybody,
> >  I would like to know as to what I can assume about order of the elements
> > when I do a seq on hash-map or a set?
>
> Absolutely nothing. If you want arbitrary but controlled ordering, use
> a vector or a seq. If you want to sort on a specific criterion that
> can be computed from each element, use sorted-map, sorted-set,
> sorted-map-by, sorted-set-by, or a seq view produced with sort or
> sort-by.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]<clojure%[email protected]>
> 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 [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to