[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.9.1 call | ||
6.9.2 functor , args , funargs |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
call
:: Call the function name with args.
a return value of name()
.
indefinite (function name)
a list of arguments
vtype
for function form.
[0] A=igcd; igcd [1] call(A,[4,6]); 2 [2] (*A)(4,6); 2
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
functor
, args
, funargs
:: Functor of function form func.
:: List of arguments of function form func.
:: cons(functor(func),args(func))
.
functor()
: indeterminate, args()
, funargs()
: list
function form
vtype
for function form.
F
, to the functor obtained
by functor()
. Then, you can type (*F
)(x)
(, or (*F
)(x,y,...)
depending on the arity,) to input a function form with argument x.
[0] functor(sin(x)); sin [0] args(sin(x)); [x] [0] funargs(sin(3*cos(y))); [sin,3*cos(y)] [1] for (L=[sin,cos,tan];L!=[];L=cdr(L)) {A=car(L); print(eval((*A)(@pi/3)));} 0.86602540349122136831 0.5000000002 1.7320508058
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] |
This document was generated on December 21, 2024 using texi2html 5.0.