Re: Obtaining sequences from lists of lists
- To: mathgroup at smc.vnet.net
- Subject: [mg36232] Re: Obtaining sequences from lists of lists
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Tue, 27 Aug 2002 02:07:52 -0400 (EDT)
- References: <akco7s$50e$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Bob, Apply[Sequence,{{a,b},{c,d}}] Sequence[{a,b},{c,d}] Outer[F,Apply[Sequence,Table[{a,b},{3}]]] {{{F[a,a,a],F[a,a,b]},{F[a,b,a],F[a,b,b]}},{{F[b,a,a],F[b,a,b]}, {F [b,b,a],F[b,b,b]}}} --- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565 "Bob" <rdobrow at carleton.edu> wrote in message news:akco7s$50e$1 at smc.vnet.net... > Can anyone help me with this problem. > > If I have an n-element list, (say where each element is itself a > list), such as {{a,b}, {a,b}, {a,b}} > is there a way to strip off the outermost nesting of the list to > obtain just a sequence of of these n elements, that is > {a,b},{a,b},{a,b} so that I can use this for input for some function. > > I would like to do something like > Outer[SomeFunction, Table[{a,b},{N} ]] where I can enter N > dynamically. > The problem, of course, is that the output of the Table command is one > big list > and Outer is expecting a sequence of N separate lists after > SomeFunction. > > Thanks for your help in advance. >