[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] Local variables in lambdas
From: |
Grant Rettke |
Subject: |
Re: [Bug-apl] Local variables in lambdas |
Date: |
Sun, 14 Aug 2016 20:31:10 -0500 |
The first one looks more appealing because it is close to the normal
function declaration syntax.
Sincerely,
Grant Rettke
On Sun, Aug 14, 2016 at 2:50 PM, Juergen Sauermann
<address@hidden> wrote:
> Hi,
>
> Thinking about lambdas once more I had an idea of a syntax for declaring
> local variables in
> the lambda. In order to bring lambdas and proper functions closer together
> rather than separating
> them more than necessary, we could use the same syntax as in proper defined
> functions: a list
> of variable names separated by semicolons. A lambda with body ⍺+⍵ and local
> variables C, D,
> and E would then be declared as:
>
> {⍺+⍵;C;D;E}
>
> One could also think of
>
> {C;D;E;⍺+⍵}
>
> But the first looks more appealing to me. Any opinions?
>
> /// Jürgen