From: Stavros M. <mac...@gm...> - 2022-12-19 16:34:10
|
On Sun, Dec 18, 2022 at 10:23 PM koko via Maxima-discuss < max...@li...> wrote: > ... > But I think this is not the best way because map can also apply to > polynomial in different manner. > > So, I downloaded all sourcecode, maxima-5.46.0.tar.gz in this site. > https://sourceforge.net/projects/maxima/files/Maxima-source/5.46.0-source/ > ... a) You shouldn't need to read the source code to understand what a Maxima function or routine does. If the documentation is unclear, please ask us to improve it. b) *factor, ratsimp, *and some other routines map over lists: *factor( [x^2+x, x^2-1] ) => [x*(x+1), (x-1)*(x+1)]*. This is handy, but I recommend mapping explicitly with *map('factor, ...)* when programming, for clarity. You cannot count on all routines doing this. c) *map* maps over the *constituents* of an expression, retaining the operator: *map(f,a+b) => f(a)+f(b); map(f,a^b) => f(a)^f(b)*. This is not always meaningful or useful: *map(f,limit(g(a),a,0)) => limit(f(g(a)),f(a),f(0))*. In the case of lists, *op([a,b]) => "["*. |