Macros vs. Functions with @eval(return )

This form of function calling eval at the end is almost certainly not doing what you want it to, especially if you have a return statement inside do the eval call. Eval is always global in Julia so you are calling return in global scope, which doesn’t make sense.