I think treating the lambdas just like any function is perfectly normal,
and is exactly what any function languages does.
Now, functional languages also has lexical closures, but I'm not sure how
easy it would be to take advantage of it, since APL programs usually
doesn't take advantage of clearly
Hi,
in GNU APL you can have lambdas without result (eg. {}) and they don't
start with *λ*←.
As Kacper has pointed out you can also have user-defined functions
starting with *λ*←.
I have no plans to prevent that, but I have also no idea where the
lambdas will bring us
in GNU APL. Right now {
On 2014-03-06 10:53:12, Elias Mårtenson wrote:
> ∇λ←avg ⍵
> λ←(+/⍵)÷⍴⍵
>
> This will of course fail when the user tries to save the function.
I'm not using Emacs nor your mode, but why should it fail?
This works:
⎕FX 'λ←avg ⍵' 'λ←(+/⍵)÷⍴⍵'
avg
And so does this:
∇avg
[1]
The Emacs mode allows the user to edit an existing function by pressing C-c
C-f, or typing ∇ followed by the name of the function. This opens up the
function editor in a separate window.
However, when the user creates a function using the dfn notation:
avg ← {(+/⍵)÷⍴⍵}
And then tried to edit it