|
Hi Xtian, as I said, in the niladic case it is the APL syntax and not the fact that a function is defined as lambda which causes this behavior. Therefore local variables have no effect here. If we would change this then niladic lambdas would behave differently than niladic non-lambda functions, which I consider worse than not being able to define named niladic lambdas. And such a syntax would deviate from the standard APL syntax. As a matter of fact, all lambdas (niladic or not) are converted to defined functions of the same valence long before the statement is executed. It is only in immediate execution mode that the niladic function is computed immediately. The same time←{⎕TS} inside another define function, say FOO, may be computed long after the FOO is ⎕FXed. The conversion of time←{⎕TS} into a niladic defined function called λ1 happens when FOO is ⎕FXed while the resulting time←λ1 happens later when FOO reaches that statement in FOO. At that later point in time normal vanilla APL execution is taking place, and we do not want to change that, do we? /// Jürgen On 10/26/2016 08:16 PM, Christian
Robert wrote:
Niladic Lambda can be usefull. |
- [Bug-apl] dynamic function not referencing global? alexweiner
- Re: [Bug-apl] dynamic function not referencing glob... Christian Robert
- Re: [Bug-apl] dynamic function not referencing ... Juergen Sauermann
- Re: [Bug-apl] dynamic function not referenc... Ala'a Mohammad
- Re: [Bug-apl] dynamic function not refe... Juergen Sauermann
- Re: [Bug-apl] dynamic function not... Ala'a Mohammad
- Re: [Bug-apl] dynamic function... Juergen Sauermann
- Re: [Bug-apl] dynamic function not referenc... Christian Robert
- Re: [Bug-apl] dynamic function not refe... Juergen Sauermann
- Re: [Bug-apl] dynamic function not... Christian Robert
- Re: [Bug-apl] dynamic function not referencing glob... Christian Robert
