summaryrefslogtreecommitdiff
path: root/operators.c
diff options
context:
space:
mode:
Diffstat (limited to 'operators.c')
-rw-r--r--operators.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/operators.c b/operators.c
index 05eed7d..c46e627 100644
--- a/operators.c
+++ b/operators.c
@@ -4,8 +4,8 @@
#include "apl9.h"
-Rune primmonopnames[] = L"¨⍨⌸⌶&";
-Rune primdyadopnames[] = L"⍣.∘⍤⍥@⍠⌺";
+Rune primmonopnames[] = L"¨⍨⌸⌶&∆";
+Rune primdyadopnames[] = L"⍣.∘⍤⍥@⍠⌺⍙";
opmonad monadoperatordefs[] = {
opEach, /* ¨ */
@@ -13,6 +13,7 @@ opmonad monadoperatordefs[] = {
0, /* ⌸ */
0, /* ⌶ */
0, /* & */
+ opSelfReference1, /* ∆ */
};
opdyad dyadoperatordefs[] = {
@@ -24,6 +25,7 @@ opdyad dyadoperatordefs[] = {
0, /* @ */
0, /* ⍠ */
0, /* ⌺ */
+ opSelfReference2, /* ⍙ */
};
/* Monadic operators */
@@ -74,6 +76,13 @@ opSwitch(Datum *lefto, Array *left, Array *right)
return nil;
}
+Array *
+opSelfReference1(Datum *lefto, Array *left, Array *right)
+{
+ throwerror(L"∆", ESyntax);
+ return nil;
+}
+
/* Dyadic operators */
Array *
opBind(Datum *lefto, Datum *righto, Array *left, Array *right)
@@ -160,4 +169,11 @@ opOver(Datum *lefto, Datum *righto, Array *left, Array *right)
freearray(tmp);
return res;
}
+}
+
+Array *
+opSelfReference2(Datum *lefto, Datum *righto, Array *left, Array *right)
+{
+ throwerror(L"⍙", ESyntax);
+ return nil;
} \ No newline at end of file