I am trying to make a suffix function, that takes a variable amount of args and prints out the last 'x'.
For example, if I said (suffix 3 '(a b c d e f))
I would get
D E F
back...
But I can't get this to work. Here is what I have so far...
HELP!
Thanks.
Code: Select all
(defun suffix (x &rest args)
setq f 0
(loop for l in args
for y from 1
if (>= f x)
do((print l))
(setq f (+ f 1))
)
)