MathGroup Archive 1996

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

Search the Archive

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


>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 {}?