From 580b7dd6b3590134e7be96ebf758a956926130a9 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Tue, 25 Jan 2022 16:53:54 +0000 Subject: =?UTF-8?q?Actually=20pass=20=E2=8D=B6=20and=20=E2=8D=B9=20unchang?= =?UTF-8?q?ed=20with=20=E2=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apl9.h | 4 ++-- functions.c | 12 ++++++------ operators.c | 4 ++-- 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); -- cgit v1.2.3