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 ,@args)
,@body)
(defun ,name (,system ,@args)
(execute-transaction
(,tx-name ,system ,@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