Hello,
It is my pleasure to announce a new release of cppo (v1.7.0) with two new features.
-
The new syntax
#def ... #enddef
allows a macro definition to span several lines, without backslashes. This syntax allows macro definitions to be nested.#def repeat_until(action,condition) action; while not (condition) do action done #enddef
-
A parameterized macro can take a parameterized macro as a parameter: this is a higher-order macro.
#define TWICE(e) (e + e) #define APPLY(F : [.], e) (let x = (e) in F(x)) let forty_two = APPLY(TWICE,1+2+3+4+5+6)
For more details, please see the documentation.