January 2020
Intermediate to advanced
532 pages
13h 31m
English
As an expression is just a data structure, we can easily construct them programmatically. Understanding how to do this is essential for metaprogramming, which involves creating new code structures on the fly.
The Expr constructor has the following signature:
Expr(head::Symbol, args...)
The head node always carries a symbol. The arguments just contain whatever the head node expects—for example, the simple expression x + y can be created as follows:

Of course, we can always create a nested expression if we want to:
At this point, you may wonder whether there is an easier way to create expressions without ...
Read now
Unlock full access