[Top][All Lists]

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

Re: [Bug-apl] Local variables in lambdas

From: Christian Robert
Subject: Re: [Bug-apl] Local variables in lambdas
Date: Sun, 14 Aug 2016 19:41:14 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

I also prefer the first one. Since execution is from right to left (in general) 
declaration of
local variables *before* using them make more sense to me.


On 2016-08-14 15:50, Juergen Sauermann wrote:

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

reply via email to

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