MathGroup Archive 2006

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

Search the Archive

removing dublicates in lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63774] removing dublicates in lists
  • From: Kent Holing <KHO at statoil.com>
  • Date: Sat, 14 Jan 2006 02:32:15 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

removeRepetitions[L_] := Fold[If[#2==Last[#1],#1,Append[#1,#2]]&,{First[L]},Rest[L]] successfully removes dublicates in lists like {1,2,2,3,6}.
Is it an easy way to extend the functionality of this function such that it works with lists like
{{1,2,3},{44,56,78},{1,2,3},...} removing dublicate elements such that {1,2,3}?
Kent Holing
NORWAY


  • Prev by Date: Re: Can anybody help?
  • Next by Date: Re: How to create {{x1,y1}, ..., {xn,yn}} data from {x1,...,xn} and {y1, ..., yn}
  • Previous by thread: Re: data extraction question
  • Next by thread: Re: removing dublicates in lists