On Thursday, December 29, 2016 at 5:47:14 PM UTC-6, Erik Assum wrote:
>
> Wouldn't the order be different depending on wether you keep the first or 
> the last?
>
> (distinct [1 2 1])
> => [1 2]
> vs
> (distinct [1 2 1])
> => [2 1]
>
> Erik. 
> -- 
> i farta
>
>
I should have thought about this scenario beforehand.  I was almost 
convinced here that there was no usefulness in knowing which duplicate was 
kept.  However, it can effect order so really the part (2) problem relates 
to part (1).  Thanks for pointing that out.

And in reference to this one:
On Thursday, December 29, 2016 at 4:16:20 PM UTC-6, puzzler wrote:
> They may have different metadata, or some objects may already have cached 
hash values while others do not, or they may be complex enough objects that 
for a later part in the program it matters that certain equal objects meet 
the equality test quickly by actually being identical objects, not just 
equal.
 
These were the sort of things I was thinking about originally as the issue 
with my point (2).  I do agree that object identity has properties that can 
matter.  The metadata is a particularly good point.  
However, as I said above, the ordering concern is more of the issue I was 
mostly concerned with in general.

I appreciate everyone's input on this.

-- 
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.

Reply via email to