Search found 2 matches
- Thu Sep 15, 2011 2:47 am
- Forum: Common Lisp
- Topic: pop puzzle
- Replies: 2
- Views: 4058
Re: pop puzzle
Thank you for your answer and pointers to defsetf and define-setf-expander. I will study it.
- Wed Sep 14, 2011 2:51 pm
- Forum: Common Lisp
- Topic: pop puzzle
- Replies: 2
- Views: 4058
pop puzzle
Hello Lispers! It is usually said that (pop stack) is equivalent of (prog1 (first stack) (setf stack (rest stack))) or (let ((elt (first stack))) (setf stack (rest stack)) elt). I don't understand why the following function doesn't work as an equivalent of built-in pop: (defun my-pop (lst) (let ((x ...