The meta-programming tag has no wiki summary.
30
votes
3answers
2k views
Metaprogramming in Mathematica
Being functional, and having no "quotation", i.e. essentially treating data and programs semantically same, Mathematica seems naturally capable of doing metaprogramming. But could anyone construct a ...
7
votes
2answers
154 views
Compiling more functions that don't call MainEvaluate
I would like to use Compile with functions defined outside Compile.
For example if I have the two basic functions F and G
F[x_] := x + 2
G[x_] := x
And I want ...
11
votes
2answers
248 views
How can I compile this function
I want to simplify my function f1 to f2, but f2 can't be compiled. How can I make it ...
9
votes
3answers
213 views
Comparing Mathematica expressions like diff
I am looking for a way to compare (or "diff") two Mathematica expressions, similarly to how to diff utility can compare two text files and report the differences.
Has anyone already written such a ...
13
votes
2answers
302 views
How to REALLY Hold arguments and capture FullForm?
I'm trying to write an expression deconstructor or FullForm-capturer; might even call it a parser, maybe, but that might be too glorious a word.
I got some great ...
2
votes
3answers
145 views
how can I generate a sequence of assignments?
I want to make a sequence like follows
r[1]=
r[2]=
r[3]=
r[4]=
....
r[n]=
The above r[i] represents coordinates which I have ...