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?

有帮助吗?

解决方案

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

其他提示

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]]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top