MathGroup Archive 2007

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

Search the Archive

Re: Re: rule based program for "Deleting repeated members

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82005] Re: [mg81993] Re: rule based program for "Deleting repeated members
  • From: klamser <klamser at t-online.de>
  • Date: Tue, 9 Oct 2007 05:37:53 -0400 (EDT)
  • References: <fe7j44$qga$1@smc.vnet.net> <200710080607.CAA18896@smc.vnet.net>

... if it is a rule, that the union of a set has only one element of 
each global set, then try

Union[s]

Peter Klamser

sean_incali schrieb:
> How about a simplests way of using intersection, instead of rule
> based.
>
> s = {a, b, c, c, d, e, e, f, g, g, g, h, a, b} // Intersection
> {a, b, c, d, e, f, g, h}
>
>
>
>
> On Oct 6, 2:05 am, mumat <csar... at gmail.com> wrote:
>   
>> Hi,
>>
>> I have a list s={a,b,c,c,d,e,e,f,g,g,g,h,a,b};
>>
>> I need to write a program so that it reads the list and ignors
>> repeated elements; so it outputs the following:
>>
>> RepeatRemover[s]={a,b,c,d,e,f,g,h,a,b};
>>
>> I am looking for a rule-based program to do this!
>>
>> Any help would be greatly appreciated.
>>
>> C.S.
>>     
>
>
>
>
>   


  • Prev by Date: Import of EPS files
  • Next by Date: Re: NumberForm question
  • Previous by thread: Re: rule based program for "Deleting repeated members of a list."
  • Next by thread: Re: rule based program for "Deleting repeated members of a list."