* @return Cons
   */
  public static Cons copyConsList(Cons self) {
    if (self == Stella.NIL) {
      return (Stella.NIL);
    }
    { Cons newconslist = Cons.cons(self.value, Stella.NIL);
      Cons nextcons = newconslist;
      Cons copyfromcons = null;
      Cons previouscons = null;

      copyfromcons = self.rest;
      while (!(copyfromcons == Stella.NIL)) {
        previouscons = nextcons;
        nextcons = Cons.cons(copyfromcons.value, Stella.NIL);
        previouscons.rest = nextcons;
        copyfromcons = copyfromcons.rest;
      }
      return (newconslist);
    }
  }