Question

The function to_poly_solve in maxima returns a %union but I want to work with a list.

How can %unions be turned into lists since listify doesn't work?

Was it helpful?

Solution

abc : %union([a = 2], [b = 3]);
args(abc);

OTHER TIPS

This function worked for me:

LISTIFY(Union) := block(
                        [res : []],
                        (for si in Union do res : append(res, [si])),
                        return (res)
                       );

Usage:

abc : %union([a = 2], [b = 3]);
LISTIFY(abc);

Output:

%union([a=2],[b=3])
[[a=2],[b=3]]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top