RichieZ
Diamond Member
How do you specify default values for a keywords?
for example:
(defun test (&key x y)
(list x y))
how do i make the default value for x 1 and y 2
an example given in the book i'm using looks something like this:
(defun test (&key x y) '(🙂x 1)🙂y 2))
(list x y))
but this doesn't do anything, x and y are still both nil
I'm using Allegro CL
for example:
(defun test (&key x y)
(list x y))
how do i make the default value for x 1 and y 2
an example given in the book i'm using looks something like this:
(defun test (&key x y) '(🙂x 1)🙂y 2))
(list x y))
but this doesn't do anything, x and y are still both nil
I'm using Allegro CL