Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

append concatenates lists so you'd need (append nil '(foo))


It actually leaves both its arguments unaltered and creates a new list. There's another function called nconc which does concatenate them, changing its first argument to the new list (unless its first argument is NIL).


Note that append does not copy the last argument, so there is structure sharing when you use it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: