[cl-prevalence-devel] A useful macro?
Anthony Fairchild
fairchild.anthony at gmail.com
Mon Nov 7 23:16:15 UTC 2011
Hi cl-prevalence devs,
I have been playing around a bit with cl-prevalence and found the following
macro useful:
(defmacro deftxn (name (system &rest args) &body body)
(let ((tx-name (intern (format nil "TX-~A" NAME))))
`(progn
(defun ,tx-name (,system , at args)
, at body)
(defun ,name (,system , at args)
(execute-transaction
(,tx-name ,system , at args))))))
So my question is, is this pattern worth abstracting or is there a reason
to use the more explicit method of defining a tx-* function then calling
(execute (make-transaction ...)) or (execute-transaction ...).
Thanks!
Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-prevalence-devel/attachments/20111107/8140803b/attachment.html>
More information about the Cl-prevalence-devel
mailing list