bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

edif and edif2


From: Chris Moller
Subject: edif and edif2
Date: Sat, 18 Jul 2020 19:28:43 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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

[Prev in Thread] Current Thread [Next in Thread]