Closed mmontone closed 2 years ago
Hi,
I use push-end quite a lot in my projects and think it would be a good addition to this library.
push-end
Lispworks has it: http://www.lispworks.com/documentation/lw71/LW/html/lw-808.htm
but I think other lisps don't.
This is my implementation, but there's better probably:
(defmacro push-end (obj place) "Push OBJ to the end of PLACE." `(if (null ,place) (setf ,place (list ,obj)) (setf (cdr (last ,place)) (cons ,obj nil))))
Thoughts?
Thanks!! :D
Hi,
I use
push-end
quite a lot in my projects and think it would be a good addition to this library.Lispworks has it: http://www.lispworks.com/documentation/lw71/LW/html/lw-808.htm
but I think other lisps don't.
This is my implementation, but there's better probably:
Thoughts?