|
@@ -2007,24 +2007,6 @@ Vt*_advinverse_d(St*st,vt*self,Vt*x,Vt*y){Vt*_v=self->bonds->value;
|
|
if(!iv)R st->udf;
|
|
if(!iv)R st->udf;
|
|
Vt*a=eR(st,iv,x,0,iv->rank[0]);
|
|
Vt*a=eR(st,iv,x,0,iv->rank[0]);
|
|
Vt*b=eR(st,iv,y,0,iv->rank[0]);R apD(st,_v,a,b);}
|
|
Vt*b=eR(st,iv,y,0,iv->rank[0]);R apD(st,_v,a,b);}
|
|
-Vt*_advlaminate_m(St*st,vt*self,Vt*x){Vt*_v=self->bonds->value;
|
|
|
|
- if(_v->tag!=VERB)R st->udf;
|
|
|
|
- if(xt!=ARRAY)x=venlist(st,N,x);
|
|
|
|
- elif(le(xa))R st->udf;
|
|
|
|
- Vt*r=xa->value;
|
|
|
|
- Lst*t=xa;
|
|
|
|
- WH(t){r=apD(st,_v,r,t->value);
|
|
|
|
- t=t->next;}
|
|
|
|
- R r;}
|
|
|
|
-Vt*_advlaminate_d(St*st,vt*self,Vt*x,Vt*y){Vt*_v=self->bonds->value;
|
|
|
|
- if(_v->tag!=VERB)R st->udf;
|
|
|
|
- if(yt!=ARRAY)y=venlist(st,N,y);
|
|
|
|
- elif(le(ya))R st->udf;
|
|
|
|
- Vt*r=x;
|
|
|
|
- Lst*t=ya;
|
|
|
|
- WH(t){r=apD(st,_v,r,t->value);
|
|
|
|
- t=t->next;}
|
|
|
|
- R r;}
|
|
|
|
#define ADVERB(__name,__symb)\
|
|
#define ADVERB(__name,__symb)\
|
|
vt*adv##__name(St*st,Vt*v){\
|
|
vt*adv##__name(St*st,Vt*v){\
|
|
vt*nv=vnew();\
|
|
vt*nv=vnew();\
|
|
@@ -2050,8 +2032,7 @@ ADVERB(amend,"`");
|
|
ADVERB(filter,"&.");
|
|
ADVERB(filter,"&.");
|
|
ADVERB(span,"/:");
|
|
ADVERB(span,"/:");
|
|
ADVERB(inverse,"-:");
|
|
ADVERB(inverse,"-:");
|
|
-ADVERB(laminate,"@:");
|
|
|
|
-advt ADVERBS[]={{"/",advfold,N}, {"/.",advconverge,N},{"\\",advscan,N}, {"\\.",advconverges,N},{"\"",adveach,N}, {"\".",adveachprior,N},{";.",advreflex,N},{"`",advamend,N},{"&.",advfilter,N},{"/:",advspan,N},{"-:",advinverse,N},{"@:",advlaminate,N}};
|
|
|
|
|
|
+advt ADVERBS[]={{"/",advfold,N}, {"/.",advconverge,N},{"\\",advscan,N}, {"\\.",advconverges,N},{"\"",adveach,N}, {"\".",adveachprior,N},{";.",advreflex,N},{"`",advamend,N},{"&.",advfilter,N},{"/:",advspan,N},{"-:",advinverse,N}};
|
|
Vt*_cnjbond_m(St*st,vt*self,Vt*x){Vt*v1=self->bonds->value;
|
|
Vt*_cnjbond_m(St*st,vt*self,Vt*x){Vt*v1=self->bonds->value;
|
|
Vt*v2=self->bonds->next->value;
|
|
Vt*v2=self->bonds->next->value;
|
|
if(v1->tag==VERB&&v2->tag==VERB)R apM(st,v1,apM(st,v2,x));
|
|
if(v1->tag==VERB&&v2->tag==VERB)R apM(st,v1,apM(st,v2,x));
|
|
@@ -2505,7 +2486,6 @@ cS AHELP =\
|
|
"xf\\. eachleft 1-\\.1 2 3 yields 0 -1 -2" "\n"\
|
|
"xf\\. eachleft 1-\\.1 2 3 yields 0 -1 -2" "\n"\
|
|
"f\": rank #\":1 2 3$1 yields 3 3, #\":inf 2 3$1 yields 1 1 1,:1 1 1" "\n"\
|
|
"f\": rank #\":1 2 3$1 yields 3 3, #\":inf 2 3$1 yields 1 1 1,:1 1 1" "\n"\
|
|
"xf\": rank 1 2 3 *:\":1 1 2 3 yields (,1),:2 2,:3 3 3" "\n"\
|
|
"xf\": rank 1 2 3 *:\":1 1 2 3 yields (,1),:2 2,:3 3 3" "\n"\
|
|
-"f@: laminate 1 2 3,:1 2 3@@:0 1 yields 2" "\n"\
|
|
|
|
"n` amend 'gw'0 3`'cross' yields 'grows'" "\n"\
|
|
"n` amend 'gw'0 3`'cross' yields 'grows'" "\n"\
|
|
"f&. filter >;0&.-2!.2 yields 1 2, basically shortcut for ]#.f" "\n"\
|
|
"f&. filter >;0&.-2!.2 yields 1 2, basically shortcut for ]#.f" "\n"\
|
|
"f/: span =;' '/:'x y z' yields (,'x'),:(,'y'),:(,'z')" "\n"\
|
|
"f/: span =;' '/:'x y z' yields (,'x'),:(,'y'),:(,'z')" "\n"\
|
|
@@ -2533,7 +2513,7 @@ cS IHELP =\
|
|
cS SHELP =\
|
|
cS SHELP =\
|
|
"/ comment" "\n"\
|
|
"/ comment" "\n"\
|
|
"5+5 / also comment" "\n"\
|
|
"5+5 / also comment" "\n"\
|
|
-"5+5/not comment (no whitespace before /)" "\n\n"\
|
|
|
|
|
|
+"5+5/not comment (no whitespace before /)" "\n"\
|
|
"nil udf / special, nil and undefined" "\n"\
|
|
"nil udf / special, nil and undefined" "\n"\
|
|
"'a'%2 / = nan, nan used to denote illegal numeric operation" "\n"\
|
|
"'a'%2 / = nan, nan used to denote illegal numeric operation" "\n"\
|
|
"+1 2 3 / = udf, attempt to transpose flat vector, udf/undefined used to denote illegal operation" "\n"\
|
|
"+1 2 3 / = udf, attempt to transpose flat vector, udf/undefined used to denote illegal operation" "\n"\
|
|
@@ -2545,6 +2525,7 @@ cS SHELP =\
|
|
"1 2 3 / numbers array" "\n"\
|
|
"1 2 3 / numbers array" "\n"\
|
|
"'hello world!' 'bla''bla' / quote, array of chars" "\n"\
|
|
"'hello world!' 'bla''bla' / quote, array of chars" "\n"\
|
|
",'a' / 1-char string" "\n"\
|
|
",'a' / 1-char string" "\n"\
|
|
|
|
+",1 / 1-elt array" "\n"\
|
|
"() / unit, empty array" "\n"\
|
|
"() / unit, empty array" "\n"\
|
|
"1,:(5+5),:1 2 3 / strand, mixed array literal" "\n"\
|
|
"1,:(5+5),:1 2 3 / strand, mixed array literal" "\n"\
|
|
"-1 / negative num literal" "\n"\
|
|
"-1 / negative num literal" "\n"\
|