Hi Qian, I support such a change, in fact, I don't like something like
"+" / list because it's not exactly clear what happens for the empty list. I'd rather always put the three-argument "reduce" in order to specify the value that is to be returned for the empty list. Note that http://fricas.github.io/api/Collection.html#l-collection-reduce says: reduce: ((S, S) -> S, %) -> S if % has finiteAggregate reduce(f, u) reduces the binary operation f across u. For example, if u is [x, y, ..., z] then reduce(f, u) returns f(..f(f(x, y), ...), z). Note: if u has one element x, reduce(f, u) returns x. Error: if u is empty. ^^^^^^^^^^^^^^^^^^^^^ And please include "-+*" in your regular expression. Furthermore there are also cases like n := _+/[#a for a in l] for example in aggcat.spad. Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/f4242d8d-1480-e2b8-b019-4a3481ec7c1c%40hemmecke.org.
