Per a suggestion by Christian Robert, edif and edif2 now support creating and editing named lambdas.  (Though, to be honest, the usual way of creating a named lambda, fubar←{whatever}, is easier--I just included the "create" capability for completeness.  The only real value of lambda mode is editing existing lambdas.)

Lambda-editing mode differs from normal function-editing mode in that no header is shown in lambda mode (APL creates the header based on the alpha (⍺) and omega (⍵) variables in the expression).  Lambdas also have an implicit λ← assignment; that assignment is not shown in the editor.

So, for example, if you create a lambda like

   fubar←{3×⍳⍵}

and then edit it with edif:

   edif 'fubar'

what you'll see is an editor screen containing just

   3×⍳⍵



The for-completeness lambda-creation mode can be had by abusing the axis argument:

   edif [1] 'fubar'

Further (not that many people will care),

   edif [2] ''

will show the edif version:

   APL editor native function 2.2.0

and

   edif [3] ''

will show git version information

   08f5d28 2020-07-16 19:52:19 -0400


https://github.com/ChrisMoller/edif

Have fun,
cm

Reply via email to