Re: How to get rid of the outer {}?
- To: mathgroup at smc.vnet.net
- Subject: [mg5534] Re: [mg5507] How to get rid of the outer {}?
- From: Allan Hayes <hay at haystack.demon.co.uk>
- Date: Thu, 19 Dec 1996 01:02:32 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Zvi Wiener <mswiener at pluto.mscc.huji.ac.il> >Subject: [mg5507] How to get rid of the outer {}? writes 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: a = Outer[List,{0,1}, {0,1}, {0,1}, {0,1}]; b = Outer[List,Sequence@@Table[{0,1}, {4}]]; c = Outer[List,##]&@@Table[{0,1}, {4}]l a==b==c True General pattern: A@@B[x,y] (full form Apply[A, B[x,y]]) -> A[x,y] (head B replaced by A). Allan Hayes hay at haystack.demon.co.uk http://www.haystack.denmon.co.uk