MathGroup Archive 2007

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

Search the Archive

Re: Iterate through a list help


On Jun 5, 4:13 am, Nick <hoffmann... at gmail.com> wrote:

Hello Nick:

I set your list to the variable qq.

Then I did this: #[[1]] & /@ qq

and I got: {1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,
5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}

It looks like what you want. By the way, this is the same as:

Map[Function[x,x[[1]]], qq]

HTH.

Regards..

> Hello! <snipped/>



  • Prev by Date: Re: Anyone used the Notation package in v6 already?
  • Next by Date: substitute for $TextStyle in 6
  • Previous by thread: Iterate through a list help
  • Next by thread: Re: Iterate through a list help