You would need a function, not a macro, to do that, and the returned Expr
is not inserted into the local scope and can only be eval
-uated in the global scope. If you only need to generate functions in the global scope, that’s fine, and not all expressions are transformed in macros e.g. @eval
loops.