Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Keeping order with Union

  • To: mathgroup at
  • Subject: [mg32648] Re: [mg32590] Keeping order with Union
  • From: Ken Levasseur <Kenneth_Levasseur at>
  • Date: Fri, 1 Feb 2002 16:10:47 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at


When Al Hibbard and I developed our AbstractAlgebra packages (see, we needed exactly such a function.  Al
came up with a good solution.  He called it UnionNoSort and it is in the
Core context of the packages, which you can download for free.

Ken Levasseur

Dave Snead wrote:

> I'd like a function that throws out duplicate entries in a list and keeps
> the
> original list order.  (when it sees 2 equal entries it throws out the one
> that is later in the list).   I'd use Union, but it sometimes changes the
> order of the elements in the list.  What's the tersest way to do this?
> Thanks in advance,
> Dave Snead

  • Prev by Date: How to draw such 3D surface?
  • Next by Date: Re: Keepping order with Union
  • Previous by thread: Re: Re: Keeping order with Union
  • Next by thread: Re: TeXForm and negative exponents