|
From: Stavros M. <mac...@gm...> - 2024-03-03 23:55:34
|
*maplist*, by default (*inflag:false*) operates on the *visible* structure of the expression, which in this case is "-"(x1). You can "recover" the minus sign using *op*: *op(-x1) => "-"*. If you want to operate on the *internal* structure of the expression (which is usually more convenient for programmatic manipulation), set *inflag:true*, and then *op(-x1) => "*"* and *args(-x1) => [-1, x1]*. On Sun, Mar 3, 2024 at 6:42 PM Dan Stanger <dan...@gm...> wrote: > Hello All, > maplist(lambda([u],u),-x1) > returns the list [x1]. Shouldn't it be [-x1]? If [x1] is correct, is there > a way to recover the minus sign? > Dan Stanger > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |