Write macros to abstract combining patterns