Based on the results of the ensuing discussion, I decided to refine my macro to just be one coherent defun. I experimented with a few different ways to do this, but settled on something that seemed relatively clear and minimal, with pattern matchers that seemed like a better fit for arglists than what exists in pcase already (but it's all pcase under the hood). To give a flavor of what it looks like in practice, here's a few pattern defuns from the test: (defun-pattern fibonacci "Compute the fibonacci sequence." ((0) 0) ((1) 1) ((n) (+ (fibonacci (- n 1)) (fibonacci (- n 2))))) (defun-pattern crit "D&D 5e critical hit computation, taking in the results of a d20 and a list of attributes currently in effect. Returns whether the results are a crit or not." ((20 _) t) ((19 (pred (member 'improved-crit))) t)) I'm attaching the package, which works, although there's some non-ideal parts of the implementation. If people think it is valuable, I can add this to GNU ELPA.