MathGroup Archive 2002

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

Search the Archive

Re: more elements in a list


Hi,

RepeatList[lst_List, rep_List] /; Length[lst] == Length[rep] :=
   Sequence @@@ Table @@@ Transpose[{lst, {#} & /@ rep}]

will do that.

Regards
  Jens

merkat wrote:
> 
> Hi ,
> 
> How do I multiply the number of elements in a list?
> I have the lists:
> {a,b,c}  and
> {2,5,4}
> 
> the result should be:
> {a,a,b,b,b,b,b,c,c,c,c}
> 
> Merkat


  • Prev by Date: Re: more elements in a list
  • Next by Date: Re: arguments/realtime3d
  • Previous by thread: Re: more elements in a list
  • Next by thread: RE: more elements in a list