On Wednesday 15 of May 2013 15:47:06 you wrote:
> You seem to want to use `apply'. This lets you build up the argument
> list to a function, then apply the function to the argument list:
>
> apply(function, arglist);
Thank you for the tip, but I have no idea how to make such function, what it should do.
I try this way, but this did not work.
collect(expr, Lx):= ratsimp(expr, Lx)$
This did not work
apply('collect, [e1, Lx]);
also error here
apply('collect, e1, Lx);
I completely have no idea. Could someone help or point me to some similar examples.
I found about matrix and apply (somewhere in net), but what abut function, which have one argument
or more fixed arguments and the rest need to be given as sequence, i.e.: arg1, arg2,..., argn, but not as a list?
How is the general approaches to such situations.
DataL : [[1, 2], [2, 4], [3, 6], [4, 8]];
DataM : apply('matrix, DataL);
but what to do when we need to use:
- ratsimp(fixed_expr, arg1, arg2, ..., argn)
- collectterms(fixed_expr, arg1, arg2, ..., argn )
etc.
How I can make or transform these functions to pass to it list as a second argument
the list
arglist: [arg1, arg2, ..., argn];
and call it as e.g.:
- ratsimp2(fixed_expr, arglist)
- collectterms2(fixed_expr, arglist)
etc.
Thank you in advance.
> Leo
Zbigniew