Replaced higher-order functions with macros for generating the code for operators