| Paste number 22074: | splice, use what instead ? |
| Pasted by: | lhz |
| 2 years, 6 months ago | |
| #lisp | |
| Paste contents: |
(defmacro splice (args fun) (let ((res (gensym)) (n 0)) `(let (,res) (setf ,res ,fun) ,(append (list 'progn) (mapcar (lambda (arg) `(setf ,arg (elt ,res ,(1- (incf n))))) args)) ))) (let (a b c) (splice (a b c) (list 1 2 3 4))) |
This paste has no annotations.