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
I found some tutorials on the web, but cannot get this to work. Probably due to my being familiar with c/c++ and not yet understanding LISP.
Thanks in advance.