I am trying to learn LISP for the first time. What I am trying to do seems basic to me but I am having trouble since I don' t have the experience.
I would like to create a function to accept a list of variable arguments, and then iterate through it, printing the first n values. Here is what I have tried:
Code: Select all
(defun it (n &rest values)
(loop for y in values
for n from 1
do (print(y))
)
Any hints?
Thanks in advance.