Re: Help: Outer of a list of lists
- To: mathgroup at smc.vnet.net
- Subject: [mg19631] Re: Help: Outer of a list of lists
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Mon, 6 Sep 1999 04:20:45 -0400
- Organization: University of Western Australia
- References: <7qrrui$4r6$10@dragonfly.wolfram.com>
- Sender: owner-wri-mathgroup at wolfram.com
Joako wrote: > In[1]:= > (* I've got a list of lists as A *) > > A={{a,b},{c,d},{e,f}} > Out[1]= > {{a,b},{c,d},{e,f}} > In[2]:= > (* Where the number of sublists is N and the lengh of every sublist is L, > and I want to obtain the Outer list of the sublists, obviously I can > do: *) > > Outer[List,{a,b},{c,d},{e,f}] > Out[2]= > {{{{a,c,e},{a,c,f}},{{a,d,e},{a,d,f}}},{{{b,c,e},{b,c,f}},{{b,d,e},{b,d,f}}}} > (* but N and L can take different values, > so I need to obtain Outer List directly from A, Outer[List, Sequence @@ A] ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________