I was looking at the Dyalog reference manual and realised that they support
monadic ⊢ (right) as the identity function. Adding support for this in GNU
APL is trivial.

The attached patch implements this.

Regards,
Elias
Index: src/PrimitiveFunction.hh
===================================================================
--- src/PrimitiveFunction.hh    (revision 346)
+++ src/PrimitiveFunction.hh    (working copy)
@@ -775,6 +775,10 @@
    : NonscalarFunction(TOK_F2_RIGHT)
    {}
 
+   /// Overloaded Function::eval_B()
+   virtual Token eval_B(Value_P B)
+      { return Token(TOK_APL_VALUE1, B->clone(LOC)); }
+
    /// Overloaded Function::eval_AB()
    virtual Token eval_AB(Value_P A, Value_P B)
       { return Token(TOK_APL_VALUE1, B->clone(LOC)); }

Reply via email to