Hi cl-prevalence devs,<br><br>I have been playing around a bit with cl-prevalence and found the following macro useful:<br><br><span style="font-family: courier new,monospace;">(defmacro deftxn (name (system &rest args) &body body)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  (let ((tx-name (intern (format nil "TX-~A" NAME))))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    `(progn</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">       (defun ,tx-name (,system ,@args)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">         ,@body)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">       (defun ,name (,system ,@args)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">         (execute-transaction</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">          (,tx-name ,system ,@args))))))</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">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 ...).<br>
<br>Thanks!<br><br>Anthony<br>