* @param newvalue
   * @param oldvalue
   * @return Stella_Object
   */
  public static Stella_Object substituteConsTree(Stella_Object tree, Stella_Object newvalue, Stella_Object oldvalue) {
    if (Stella_Object.safePrimaryType(tree) == Stella.SGT_STELLA_CONS) {
      { Cons tree000 = ((Cons)(tree));

        if (!(tree000 == Stella.NIL)) {
          if (Stella_Object.eqlP(tree000.value, oldvalue)) {
            tree000.value = newvalue;
          }
          else {
            Stella_Object.substituteConsTree(tree000.value, newvalue, oldvalue);
          }
          Stella_Object.substituteConsTree(tree000.rest, newvalue, oldvalue);
        }
      }
    }
    else {
    }
    return (tree);
  }