Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defvar *foo* nil)
- (defun foo-test()
- (unless (functionp *foo*)
- (error "Please bind *foo* to a function"))
- (funcall *foo*))
- (defun define-foo ()
- (let ((foo "foo")
- (bar "bar"))
- (lambda ()
- (values foo bar))))
- (defmacro foo-mac (&body body)
- `(let ((*foo* (define-foo)))
- ,@body))
- (defun show-foo ()
- (multiple-value-bind (key1 key2)
- (foo-test)
- (format t "~A ~A~%" key1 key2)))
- (defun test ()
- (foo-mac
- (show-foo)))
- (test)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement