Write Programs That Write Programs

Writing programs that write other programs, also called "metaprogramming," is a useful technique in generating specialized and optimized code.

Generate C code that adds the number 2 to any data type:
Click for copyable input
New to Mathematica? Find your learning path »
Have a question? Ask support »