python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Why the use of `,@` does not work as I expected in this common lisp macro? Why is Slime returning this error message?
I am reading the book Lisp written by Winston. In addition, I am using SBCL, Emacs, and Slime.
In chapter 8 (about macros), the book has the following exercise:
Problem 8-7: A stack is a learnly ord...

Pedro Delfino
Votes: 0
Answers: 3
Why inserting `format` function inside a `dolist` expression does not work in Common Lisp?
I am using SBCL, Eamcs, and Slime. Using the print function, I can do:
CL-USER> (dolist (item '(1 2 3))
(print item))
1
2
3
NIL
In addition, format function works for single elements...

Pedro Delfino
Votes: 0
Answers: 3
How to convert this Common Lisp function into a macro?
I am using SBCL, Slime, and Emacs to develop in Common Lisp.
I have this function:
(defun build-cond-action-pairs (&rest var)
(labels ((aux (xs-left accu)
(cond ((null (cddr xs-left...

Pedro Delfino
Votes: 0
Answers: 2
Pop first element in a list using a macro
I have the following code
(defmacro popm(l)
`(prog1 (car ,l)
(setf ,l (cdr ,l))))
which is supposed to pop the first element out of the list. However, I don't know how to call the macro. I tried ...
jasd
Votes: 0
Answers: 2