* @return Cons
   */
  public Cons difference(Cons otherlist) {
    { Cons self = this;

      if ((otherlist == null) ||
          (otherlist == Stella.NIL)) {
        return (Cons.copyConsList(self));
      }
      { Cons diff = Stella.NIL;

        { Stella_Object i = null;
          Cons iter000 = self;
          Cons collect000 = null;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
            i = iter000.value;
            if (!otherlist.memberP(i)) {
              if (collect000 == null) {
                {
                  collect000 = Cons.cons(i, Stella.NIL);
                  if (diff == Stella.NIL) {
                    diff = collect000;
                  }
                  else {
                    Cons.addConsToEndOfConsList(diff, collect000);
                  }
                }
              }
              else {
                {
                  collect000.rest = Cons.cons(i, Stella.NIL);
                  collect000 = collect000.rest;
                }
              }
            }
          }
        }
        return (diff);
      }
    }
  }