# [Maxima] "product " of 2 lists

Fri Jul 30 12:55:21 CDT 2010

Dnia Wed, 28 Jul 2010 15:42:53 -0400, Stavros Macrakis napisał(a):

> Not sure what the general case is, but maybe something like this?:
>
> (%i1) l1: [a,b,c]\$
> (%i2) l2: [d,e]\$
> (%i3) create_list(append(delete(i,l1),delete(j,l2)),i,l1,j,l2); (%o3)
> [[b,c,e],[b,c,d],[a,c,e],[a,c,d],[a,b,e],[a,b,d]]
>
>
> On Wed, Jul 28, 2010 at 14:58, Adam Majewski <adammaj1 at o2.pl> wrote:
>
>> Hi,
>>
>> I have two lists :
>> [a,b,c]
>> [d,e]
>>
>> I need a new list :
>> [[a,b,d],[a,c,d],[b,c,d],[a,b,e],[a,c,e],[b,c,e]]
>>
>> How can I compute it ?
>>
>> TIA
>>
>>
>> _______________________________________________ Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
> <div>Not sure what the general case is, but maybe something like
> this?:</div><div><br></div><div><div>(%i1) l1: [a,b,c]\$</div><div>(%i2)
> l2: [d,e]\$</div><div>(%i3)
> create_list(append(delete(i,l1),delete(j,l2)),i,l1,j,l2);</div>
> <div>(%o3)
> [[b,c,e],[b,c,d],[a,c,e],[a,c,d],[a,b,e],[a,b,d]]</div><div><br></
div><br><div
> class="gmail_quote">On Wed, Jul 28, 2010 at 14:58, Adam Majewski <span
> dir="ltr"><<a
> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px
> I have two lists :<br>
> [a,b,c]<br>
> [d,e]<br>
> <br>
> I need a new list :<br>
> [[a,b,d],[a,c,d],[b,c,d],[a,b,e],[a,c,e],[b,c,e]]<br> <br>
> How can I compute it ?<br>
> <br>
> TIA<br>
> <br>
> <br>
> _______________________________________________<br> Maxima mailing
> list<br>
> <a href="mailto:Maxima at math.utexas.edu">Maxima at math.utexas.edu</a><br>
> <a href="http://www.math.utexas.edu/mailman/listinfo/maxima"
> target="_blank">http://www.math.utexas.edu/mailman/listinfo/maxima</
a><br>
> </blockquote></div><br></div>
> _______________________________________________ Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima

Thx , it works good