Re: Use of Local Variables in Lambdas (Direct Functions) ?

2021-07-10 Thread Dr . Jürgen Sauermann
Hi, in my opinion lambdas should be as close to defined functions as possible and local variables are one aspect of that. Many lambdas are simpler with ⎕IO←0 so localizing ⎕IO is a frequent simplification. The primary reason why GN

Re: Bugs (perhaps?) in behaviour of )COPY, )PCOPY with named lambda fns

2021-07-10 Thread Dr . Jürgen Sauermann
Hi, I believe this is simply a misunderstanding of functionality. Consider this (something similar happens if you )COPY the same script twice): *  )CLEAR** **  FOO←{ 42 ⊣ ⍵ }   ⍝ OK: create monadic defined function FOO (which returns 42)** **  FOO←{ 42 ⊣ ⍵ }   ⍝ ERROR: FOO is now

Re: Use of Local Variables in Lambdas (Direct Functions) ?

2021-07-10 Thread Chris Moller
Hey, isn't it one of the proper characteristics of APL that you can do /anything/ in one line--if you're clever enough?  😁 On 7/10/21 5:19 AM, Dr. Jürgen Sauermann wrote: Hi, in my opinion lambdas should be as close to defined functions as possible and local variables are one aspect of that.

Re: Use of Local Variables in Lambdas (Direct Functions) ?

2021-07-10 Thread Dr . Jürgen Sauermann
Yes, indeed. If a lambda is more than one line then something must be wrong with it. On 7/10/21 4:40 PM, Chris Moller wrote: Hey, isn't it one of the proper characteristics of APL that you can do /anything/ in one line--if you're clever enough?  😁 On 7/10/21 5:19 AM, Dr. Jürgen Sauermann wro

Re: Bugs (perhaps?) in behaviour of )COPY, )PCOPY with named lambda fns

2021-07-10 Thread Russtopia
Ah, that all makes sense. I hadn't considered the differing return types for )ERASE vs. ⎕EX, that is useful. Thank you, -Russ On Sat, 10 Jul 2021 at 07:05, Dr. Jürgen Sauermann wrote: > Hi, > > I believe this is simply a misunderstanding of functionality. > > Consider this (something similar h