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
- Follow-Ups:
- Re: removing dublicates in lists
- From: "Carl K. Woll" <carlw@wolfram.com>
- Re: removing dublicates in lists