Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro nlet (tag var-vals &body body)
- `(labels ((,tag ,(mapcar #'car var-vals) ,@body))
- (,tag ,@(mapcar #'cadr var-vals))))
- (defun iota (n)
- (nlet loop ((i 0))
- (if (>= i n) '()
- (cons i (loop (+ i 1))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement