I'm trying to add, say, x to every element of a list. For example:
(queue 3 '(1 2 3))
would give
((3 1) (3 2) (3 3))
The code below apparently does not do what I want. Any hints please?
(defun queue(x y)
(cond
((null y) nil)
(t (cons x (queue x (rest y))))))