Honestly this looks fine to me—it’s nice and explicit. It’s not just the when
clause that’s different but payload: unquote(pattern)
v payload: unquote(payload)
. What you have is nice and explicit and I think DRYing it up would probably be more confusing (and hence a great case of “when DRY is too DRY”).
Although I see Chris K. is replying and he a notorious committer of macro crimes, so I’m interested to see what he’ll suggest