Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would call that the X macro pattern, but the wiki article doesn't agree that it should pass the `fn` as the argument. Not sure if that's important.. https://en.wikipedia.org/wiki/X_Macro


Maybe at some point macros could not be passed as arguments? I honestly don’t know. Passing it as a parameter avoids all that define/undefine business.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: