3 ms·
append concatenates lists so you'd need (append nil '(foo))
by tuukkah 4y ago
append concatenates lists so you'd need (append nil '(foo))
- DonaldFisk 4y agoIt 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).
- aidenn0 4y agoNote that append does not copy the last argument, so there is structure sharing when you use it.