Jay,

That makes sense. So the only benefit of the GNU APL approach is that it
allows the definition of niladic functions by assigning from a lambda.

My personal opinion is that that's barely a benefit, and that the Dyalog
approach is much better.

Perhaps Jürgen is willing to reconsider?

Regards,
Elias


On 7 August 2014 16:35, Jay Foad <jay.f...@gmail.com> wrote:

> 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 <loke...@gmail.com> 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 <jay.f...@gmail.com> wrote:
> >>
> >> On 6 August 2014 14:15, Elias Mårtenson <loke...@gmail.com> 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.
> >
> >
>

Reply via email to