Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Trimming values from a series?

From: brett:codeconscious at: 24-Jul-2002 17:47

Hi Carl,
> > If you need your series sorted, it is probably better to sort after > > the Unique. This way you don't need to hope that Unique keeps the > > sorting intact. > > > sort unique [ "a" "b" "b" "c" "d" "e" "e" ] > > Hmmm. Are there cases where unique can change the order, as well as > stripping out duplicates?
I don't really know, I haven't tested for it. But even if it is stable in this version it could perhaps change in later versions and because the help for Unique does not suggest otherwise, I figure a bit of defensive programming is warranted. My habit is to think: "if I need it like that - then I should ensure it is like that". Regards, Brett.