Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun square (n) (* n n))
- (defun head-tail (&optional head &rest tail)
- (when head
- (insert (format "%d\n" (square head)))
- (apply #'head-tail tail)))
- (defun head-tail (&optional head &rest tail)
- (when head
- (cons (square head) (apply #'head-tail tail))))
- (head-tail 1 2 3 4 5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement