summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apl9.h4
-rw-r--r--functions.c12
-rw-r--r--operators.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/apl9.h b/apl9.h
index 68d8b3e..c275d73 100644
--- a/apl9.h
+++ b/apl9.h
@@ -291,7 +291,7 @@ Array *fnShape(Array *);
Array *fnReverseLast(Array *);
Array *fnReverseFirst(Array *);
Array *fnTranspose(Array *);
-Array *fnSelfRef1(Array *);
+Array *fnSelfReference1(Array *);
/* Dyadic functions from function.c */
Array *fnPlus(Array *, Array *);
@@ -321,7 +321,7 @@ Array *fnIndex(Array *, Array *);
Array *fnCatenateLast(Array *, Array *);
Array *fnCatenateFirst(Array *, Array *);
Array *fnReshape(Array *, Array *);
-Array *fnSelfRef2(Array *, Array *);
+Array *fnSelfReference2(Array *, Array *);
/* Monadic operators from operators.c */
Array *opEach(Datum *, Array *, Array *);
diff --git a/functions.c b/functions.c
index 34f5db1..7952565 100644
--- a/functions.c
+++ b/functions.c
@@ -59,7 +59,7 @@ fnmonad monadfunctiondefs[] = {
fnTranspose, /* ⍉ */
0, /* ⍎ */
0, /* ⍕ */
- fnSelfRef1, /* ∇ */
+ fnSelfReference1, /* ∇ */
};
fndyad dyadfunctiondefs[] = {
@@ -115,7 +115,7 @@ fndyad dyadfunctiondefs[] = {
0, /* ⍉ */
0, /* ⍎ */
0, /* ⍕ */
- fnSelfRef2, /* ∇ */
+ fnSelfReference2, /* ∇ */
};
vlong gcd_int(vlong, vlong);
@@ -705,11 +705,11 @@ fnTranspose(Array *right)
}
Array *
-fnSelfRef1(Array *right)
+fnSelfReference1(Array *right)
{
DfnFrame *dfn = getcurrentdfn();
if(dfn)
- return rundfn(dfn->code, nil, nil, nil, right);
+ return rundfn(dfn->code, dfn->lefto, dfn->righto, nil, right);
else{
throwerror(nil, ESyntax);
return nil;
@@ -1246,11 +1246,11 @@ fnReshape(Array *left, Array *right)
}
Array *
-fnSelfRef2(Array *left, Array *right)
+fnSelfReference2(Array *left, Array *right)
{
DfnFrame *dfn = getcurrentdfn();
if(dfn)
- return rundfn(dfn->code, nil, nil, left, right);
+ return rundfn(dfn->code, dfn->lefto, dfn->righto, left, right);
else{
throwerror(nil, ESyntax);
return nil;
diff --git a/operators.c b/operators.c
index 94f4f19..17ba76e 100644
--- a/operators.c
+++ b/operators.c
@@ -97,9 +97,9 @@ opPower(Datum *lefto, Datum *righto, Array *left, Array *right)
throwerror(nil, EType);
if(righto->tag == FunctionTag){
if(left)
- code = L"next←⍺⍶⍵ ⋄ next⍹⍵:⍵ ⋄ ⍺ ⍶⍙⍹ next";
+ code = L"next←⍺⍶⍵ ⋄ next⍹⍵:⍵ ⋄ ⍺∇next";
else
- code = L"next←⍶⍵ ⋄ next⍹⍵:⍵ ⋄ ⍶⍙⍹ next";
+ code = L"next←⍶⍵ ⋄ next⍹⍵:⍵ ⋄ ∇next";
}else if(righto->tag == ArrayTag){
if(righto->array->type != AtypeInt || righto->array->rank != 0 || righto->array->size != 1 || righto->array->intdata[0] < 0)
throwerror(L"right operand to ⍣", EDomain);