January 2020
Intermediate to advanced
532 pages
13h 31m
English
Let's say we want to design a macro called @compose_twice that takes a simple function call expression and calls the same function again with the result—for example, if we run @compose_twice sin(x), then it should be translated to sin(sin(x)).
Before we write the macro, let's first get familiar with the abstract syntax tree of the expression:

How does it look for sin(sin(x))? Refer to the following:

No surprise here. The second argument of the top-level call is just another expression that looks ...
Read now
Unlock full access