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

MathGroup Archive 1996

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

Search the Archive

Re: How to get rid of the outer {}?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5562] Re: [mg5507] How to get rid of the outer {}?
  • From: DCarraher at aol.com
  • Date: Thu, 19 Dec 1996 01:02:48 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

>I wish to use a command like

>Outer[ List, {0,1}, {0,1}, {0,1}, {0,1}]

>but with 30 (or more) times {0,1} instead of four.
>I can easily generate such a list by Table[ {0,1}, {30}]
>however it has an additional {}.  How I can use this list
>in Outer?
>Zvi Wiener

Dear Zvi,

If you want a list (of lists), presently in the form
of 

myList = {{0,1},{0,1},{0,1},{0,1}}

to become the sequence of lists,
{0,1},{0,1},{0,1},{0,1}

you can try

Apply[Sequence,myList]

also expressed as

Sequence@@myList

So, in your particular case, try

Sequence@@Table[ {0,1}, {30}]

David Carraher
TERC


  • Prev by Date: Re: matrix
  • Next by Date: Japanese Tester Position
  • Previous by thread: How to get rid of the outer {}?
  • Next by thread: Re: How to get rid of the outer {}?