Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2010

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

Search the Archive

Re: Generate #s

  • To: mathgroup at
  • Subject: [mg111032] Re: Generate #s
  • From: José Luis Gómez Muñoz <jose.luis.gomez at>
  • Date: Sat, 17 Jul 2010 08:18:02 -0400 (EDT)

I assume that you know that # has a special meaning in Mathematica (
arguments of pure functions, see ) and that you know
that the correct syntax for this meaning is #1, #5, #7, etc. and that
#[[1]],#[[2]], etc. is NOT correct, then you can generate your list with the
correct syntax with the following command:

Map[Slot, {1, 5, 7, 9}]

Or with this:



-----Mensaje original-----
De: Francisco Gutierrez [mailto:fgutiers2002 at] 
Enviado el: Viernes, 16 de Julio de 2010 04:16 a.m.
Para: mathgroup at
Asunto: [mg110988] Generate #s

Dear Group:
Suppose I have a list of ordered integers:
Based on it, I want to generate a list of the form:
{#[[1]], #[[5]],#[[7]],#[[9]]}
I tested with simple things like:
Table[#[[example[[i]]]], {i,1,Length[example]}]
to no avail.
How can I do it?

  • Prev by Date: Re: MathLink error
  • Next by Date: parallel computing - obsolete functions?
  • Previous by thread: Re: Generate #s
  • Next by thread: Re: Generate #s