I am trying to write a macro, DSETF, which provides 'destructuring setf' along the lines of destructuring-bind. For example
The macro I have written expands to the destructuring-bind form shown below, ie this...
(dsetf (a . b) '(1 . 2))
would set the existing variables a to 1 and b to 2.The macro I have written expands to the destructuring-bind form shown below, ie this...
(let ((a 1) (b 2))
(dsetf (a b) '(4 5)))
... expands to:(let ((a 1) (b 2))
(destructuring-bind
(#:a1 #:b2)
'(4 5)
(setf b #:b2 a #:a1)))
It works, but generates warnings on compilation (in latest SBCL). I would like to get rid of these warnings but I cannot actually understand why they are occurring. They are:The variable #:B2 is defined but never used.Can anyone assist?
The variable #:A1 is defined but never used.
undefined variable: #:A1
undefined variable: #:B2