public List concatenate(List list2, Cons otherlists) {
    { List list1 = this;

      { Cons firstlist = list1.theConsList;
        Cons lastlist = list2.theConsList;
        Cons copy = Stella.NIL;

        if (firstlist == Stella.NIL) {
          firstlist = Cons.copyConsList(lastlist);
          lastlist = firstlist;
        }
        else if (lastlist == Stella.NIL) {
          lastlist = firstlist;
        }
        else {
          lastlist = Cons.copyConsList(lastlist);
          Cons.lastCons(firstlist).rest = lastlist;
        }
        if (otherlists.length() > 0) {
          { List list = null;
            Cons iter000 = otherlists;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              list = ((List)(iter000.value));
              if (list.nonEmptyP()) {
                copy = Cons.copyConsList(list.theConsList);
                if (!(lastlist == Stella.NIL)) {
                  Cons.lastCons(lastlist).rest = copy;
                }
                else {
                  firstlist = copy;
                }
                lastlist = copy;
              }
            }
          }
        }
        list1.theConsList = firstlist;
        return (list1);
      }
    }
  }