@@ -1824,41 +1824,40 @@ A symbol can be coerced to a string.
18241824
18251825 /* end builtin */
18261826
1827- std::string to_string (const atom & a, int write) {
1827+ std::string to_string (atom a, int write) {
18281828 std::string s;
18291829 switch (a.type ) {
18301830 case T_NIL:
18311831 s = " nil" ;
18321832 break ;
18331833 case T_CONS: {
1834- atom a2 = a;
1835- if (listp (a2) && len (a2) == 2 ) {
1836- if (is (car (a2), sym_quote)) {
1837- s = " '" + to_string (car (cdr (a2)), write);
1834+ if (listp (a) && len (a) == 2 ) {
1835+ if (is (car (a), sym_quote)) {
1836+ s = " '" + to_string (car (cdr (a)), write);
18381837 break ;
18391838 }
1840- else if (is (car (a2 ), sym_quasiquote)) {
1841- s = " `" + to_string (car (cdr (a2 )), write);
1839+ else if (is (car (a ), sym_quasiquote)) {
1840+ s = " `" + to_string (car (cdr (a )), write);
18421841 break ;
18431842 }
1844- else if (is (car (a2 ), sym_unquote)) {
1845- s = " ," + to_string (car (cdr (a2 )), write);
1843+ else if (is (car (a ), sym_unquote)) {
1844+ s = " ," + to_string (car (cdr (a )), write);
18461845 break ;
18471846 }
1848- else if (is (car (a2 ), sym_unquote_splicing)) {
1849- s = " ,@" + to_string (car (cdr (a2 )), write);
1847+ else if (is (car (a ), sym_unquote_splicing)) {
1848+ s = " ,@" + to_string (car (cdr (a )), write);
18501849 break ;
18511850 }
18521851 }
1853- s = " (" + to_string (car (a2 ), write);
1854- a2 = cdr (a2 );
1855- while (!no (a2 )) {
1852+ s = " (" + to_string (car (a ), write);
1853+ a = cdr (a );
1854+ while (!no (a )) {
18561855 if (a.type == T_CONS) {
1857- s += " " + to_string (car (a2 ), write);
1858- a2 = cdr (a2 );
1856+ s += " " + to_string (car (a ), write);
1857+ a = cdr (a );
18591858 }
18601859 else {
1861- s += " . " + to_string (a2 , write);
1860+ s += " . " + to_string (a , write);
18621861 break ;
18631862 }
18641863 }
0 commit comments