I realize it's not what you were aiming for, but since you mentioned that 
you hoped for a simpler solution … you do have full use of the Julia 
language, compile-time, when writing macros. So you could use a loop, for 
example – or even call the built-in factorial function compile-time:

*macro fac(n)*

    *:($(factorial(n)))*

*end*

*julia> **macroexpand(:(@fac(10)))*

*3628800*

Reply via email to