#32 append with one argument broken

closed-fixed
nobody
None
5
2011-08-29
2011-08-29
Doug Currie
No

append with one argument should return that argument, instead it returns a list of the argument.

The fix:

if(sc->args==sc->NIL) {
s_return(sc,sc->NIL);
}
x=car(sc->args);
if(cdr(sc->args)==sc->NIL) {
- s_return(sc,sc->args);
- }
+ s_return(sc,x);
+ }
for (y = cdr(sc->args); y != sc->NIL; y = cdr(y)) {
x=append(sc,x,car(y));
}
s_return(sc,x);

Discussion

  • Kevin Cozens

    Kevin Cozens - 2011-08-29
    • status: open --> closed-fixed
     
  • Kevin Cozens

    Kevin Cozens - 2011-08-29

    Committed as revision 79.

     

Log in to post a comment.