|
From: | Elias Mårtenson |
Subject: | Re: [Bug-apl] This looks wrong |
Date: | Thu, 7 Aug 2014 16:43:14 +0800 |
Elias,
There is no such thing as a niladic lambda in Dyalog.
In Dyalog "niladic lambda functions [are] not [...] allowed at all.
Instead, they [are] interpreted as monadic functions that ignore their
argument."
So {1} is a monadic function. You can evaluate it by applying it to an argument:
{1}0
1
(Actually in Dyalog lambdas are not monadic or dyadic. They are all
"ambivalent". If they do not refer to ⍺ then any left argument will be
ignored.)
Jay.
On 7 August 2014 09:09, Elias Mårtenson <address@hidden> wrote:
> Jay,
>
> I also noticed that Dyalog does not allow self-evaluation of niladic
> lambdas. I.e. the _expression_ {1} on its own does not evaluate to 1, but
> rather to something else (it's displayed as {1}, and I'm not sure you can do
> anything with it other than assigning it to a variable).
>
> Regards,
> Elias
>
>
> On 7 August 2014 16:00, Jay Foad <address@hidden> wrote:
>>
>> On 6 August 2014 14:15, Elias Mårtenson <address@hidden> wrote:
>> > My suggestion is that niladic lambda functions will not be allowed at
>> > all.
>> > Instead, they will be interpreted as monadic functions that ignore their
>> > argument.
>>
>> That's consistent with the behaviour of Dyalog.
>>
>> Jay.
>
>
[Prev in Thread] | Current Thread | [Next in Thread] |