Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Iterate through a list help

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77291] Re: Iterate through a list help
  • From: dbsearch04 at yahoo.com
  • Date: Wed, 6 Jun 2007 07:17:32 -0400 (EDT)
  • References: <f43gfu$2cq$1@smc.vnet.net>

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