I have this function and in newList1 I want to have the original l1 that I inserted at the beginning, and the same is true for newList2 and l2 respectively. Any suggestion how I can do it?
 public static List subCombo(List l1, List l2)
    {
    List newList1= new LinkedList();
    List newList2= new LinkedList();    
    List list1= new LinkedList();
    while (!l1.isEmpty())
    {                   
        for (Object o: l2)
        {
            Double product=1.0;
            if ((Double)hd(l1) == 0.0 && (Double)hd(l2)!=0.0)
            {
                product = (1-mySub(newList1))*(Double)hd(l2); 
                list1.add(product);         
            }               
            if ((Double)hd(l1)!=0.0 && (Double)hd(l2) == 0.0)
            {
                product= (1-mySub(newList2))*(Double) hd(l1);
                list1.add(product);
            }
             if ((Double)hd(l2) == 0.0 && (Double)hd(l1)==0.0)
            {                
                product= (1-mySub(newList1))*(1-mySub(newList2));
                list1.add(product);
            }
             if ((Double)hd(l1) != 0.0 && (Double)hd(l2)!=0.0)
            {
                 product=(Double)hd(l1)*(Double)hd(l2);         
                 list1.add(product); 
            }       
            l2=tl(l2);              
        } 
        l1=tl(l1);  
    }   
    return list1;
}
 
     
     
     
    