I have problems with keyword and rest arguments mixing…
For example, if we have the following func:
Code: Select all
(defun arguments (&rest args &key (a 4) (b 5) (c 6))
(list args a b c))
; then I call:
(arguments)
(NIL 4 5 6) ; and it’s ok , as I expected…
(arguments :a 7 :b 8) --> ((:A 7 :B 8) 7 8 6)
but Instead I expected an return like :
(NIL 7 8 6)…
Why CL put this keyword args also in &rest??? I do not understand why this behavior…(and its possible utility...

Thanks in advance!