且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将集合转换为表达式Maple/将前缀更改为固定表达式

更新时间:2023-02-18 10:50:06

restart;

foo := {{a/b}, {a+x*y}}:

result := map(op, foo):

lprint(result);
  {a/b, x*y+a}

不能保证结果集的条目将以与原始集的顺序相同的顺序出现.因此,将集合用于这种一般事物永远无法正常工作.

There is no guarantee that the resulting set will have its entries appearing in the same order as the original set of sets. And hence using sets for this general kind of thing is never going to work properly.

这就是为什么我在列表而不是嵌套的 sets 的原因上周,您对该主题的许多问题中的另一个问题-完成了功能表达式名称和功能名称的映射.您当前的问题表明您没有遵循我的建议.

That's why I used nested lists instead of nested sets, in my answers to another of your many questions on this theme last week. Your current Question indicates that you're not following my advice.