Maxima Function
splice (a)
Splices (interpolates) the list named by the atom a into an expression,
but only if splice appears within buildq;
otherwise, splice is treated as an undefined function.
If appearing within buildq as a alone (without splice),
a is substituted (not interpolated) as a list into the result.
The argument of splice can only be an atom;
it cannot be a literal list or an expression which yields a list.
Typically splice supplies the arguments for a function or operator.
For a function f, the expression f (splice (a)) within buildq
expands to f (a[1], a[2], a[3], ...).
For an operator o, the expression "o" (splice (a) within buildq
expands to "o" (a[1], a[2], a[3], ...),
where o may be any type of operator (typically one which takes multiple arguments).
Note that the operator must be enclosed in double quotes ".
Examples
(%i1) buildq ([x: [1, %pi, z - y]], foo (splice (x)) / length (x)); foo(1, %pi, z - y) (%o1) ----------------------- length([1, %pi, z - y]) (%i2) buildq ([x: [1, %pi]], "/" (splice (x))); 1 (%o2) --- %pi (%i3) matchfix ("<>", "<>"); (%o3) <> (%i4) buildq ([x: [1, %pi, z - y]], "<>" (splice (x))); (%o4) <>1, %pi, z - y<>