Create a %union into a list in maxima
-
06-07-2021 - |
Question
The function to_poly_solve
in maxima returns a %union
but I want to work with a list.
How can %union
s be turned into lists since listify
doesn't work?
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