Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Macroexpand1

Function: macroexpand1 (<expr>) Returns the macro expansion of <expr> without evaluating it, when `expr` is a macro function call. Otherwise, `macroexpand1` returns <expr>.

`macroexpand1` quotes its argument. However, if the expansion of a macro function call has side effects, those side effects are executed.

If the expansion of <expr> yields another macro function call, that macro function call is not expanded.

See also `::=`, `macros`, and `macroexpand`.

Examples

```          (%i1) g (x) ::= x / 99;
x
(%o1)                      g(x) ::= --
99
(%i2) h (x) ::= buildq ([x], g (x - a));
(%o2)            h(x) ::= buildq([x], g(x - a))
(%i3) a: 1234;
(%o3)                         1234
(%i4) macroexpand1 (h (y));
(%o4)                       g(y - a)
(%i5) h (y);
y - 1234
(%o5)                       --------
99```

```(%o1)                                true
(%i2) ```

### Related Examples

? macroexpand1;

Calculate

##### macroexpand1

? macroexpand1;

Calculate 