From fairchild.anthony at gmail.com Mon Nov 7 23:16:15 2011 From: fairchild.anthony at gmail.com (Anthony Fairchild) Date: Mon, 7 Nov 2011 15:16:15 -0800 Subject: [cl-prevalence-devel] A useful macro? Message-ID: 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: