public static boolean substituteOnce(Stella_Object expression, Stella_Object newtree, Stella_Object oldtree) {
    if (Stella_Object.safePrimaryType(expression) == Stella.SGT_STELLA_CONS) {
      { Cons expression000 = ((Cons)(expression));

        if (!(expression000 == Stella.NIL)) {
          if (Stella_Object.eqlP(expression000.value, oldtree)) {
            expression000.value = newtree;
            return (true);
          }
          return (Stella_Object.substituteOnce(expression000.value, newtree, oldtree) ||
              Stella_Object.substituteOnce(expression000.rest, newtree, oldtree));
        }
      }
    }
    else {
    }
    return (false);
  }