Annotation of OpenXM/src/asir-doc/parts/builtin/function.texi, Revision 1.1.1.1
1.1 noro 1: @node $BH!?t$KBP$9$kA`:n(B,,, $BAH$_9~$_H!?t(B
2: @section $BH!?t$KBP$9$kA`:n(B
3:
4: @menu
5: * functor args funargs::
6: @end menu
7:
8: @node functor args funargs,,, $BH!?t$KBP$9$kA`:n(B
9: @subsection @code{functor}, @code{args}, @code{funargs}
10: @findex functor
11: @findex args
12: @findex funargs
13:
14: @table @t
15: @item functor(@var{func})
16: :: @var{func} $B$NH!?t;R$r<h$j=P$9(B.
17: @item args(@var{func})
18: :: @var{func} $B$N0z?t%j%9%H$r<h$j=P$9(B.
19: @item funargs(@var{func})
20: :: @code{cons(functor(@var{func}),args(@var{func}))} $B$rJV$9(B.
21: @end table
22:
23: @table @var
24: @item return
25: @code{functor()} : $BITDj85(B, @code{args()}, @code{funargs()} : $B%j%9%H(B
26: @item func
27: $BH!?t7A<0$rI=$9ITDj85(B
28: @end table
29:
30: @itemize @bullet
31: @item
32: $BH!?t7A<0$K4X$7$F$O(B, @code{vtype()} $B$r;2>H(B.
33: @item
34: $BH!?t7A<0(B @var{func} $B$NH!?t;R(B, $B0z?t%j%9%H$r<h$j=P$9(B.
35: @item
36: $B5U$K(B, $B<h$j=P$7$?H!?t;R$rCM$K;}$D%W%m%0%i%`JQ?t$r(B @code{F} $B$H$9$l$P(B (@code{*F})(x) $B$G(B
37: x $B$r0z?t$H$9$kH!?t8F$S=P$7$^$?$OH!?t7A<0$,F~NO$G$-$k(B.
38: @end itemize
39:
40: @example
41: [0] functor(sin(x));
42: sin
43: [0] args(sin(x));
44: [x]
45: [0] funargs(sin(3*cos(y)));
46: [sin,3*cos(y)]
47: [1] for (L=[sin,cos,tan];L!=[];L=cdr(L)) @{A=car(L); print(eval((*A)(@@pi/3)));@}
48: 0.86602540349122136831
49: 0.5000000002
50: 1.7320508058
51: @end example
52:
53: @table @t
54: @item $B;2>H(B
55: @fref{vtype}.
56: @end table
57:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>