bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] A couple of bugs, and a question on the power operator


From: Jay Foad
Subject: Re: [Bug-apl] A couple of bugs, and a question on the power operator
Date: Mon, 15 Aug 2016 09:16:19 +0100

On 13 August 2016 at 13:05, Juergen Sauermann <address@hidden> wrote:
In "Mastering Dyalog APL" I haven't found the monadic case for the right function argument
G of the power operator. In that book G seems to be always dyadic. So the monadic case looks
like a new Dyalog invention. And, if it is defined like you say, IMHO not the ultimate wisdom.

There is no "monadic case". G is always applied dyadically, and if it happens to be a strictly monadic function then you'll get a SYNTAX ERROR:

      ⎕FX'r←g y' 'r←g>10' ⍝ g is strictly monadic
      2 g 4 ⍝ applying it dyadically gives an error
SYNTAX ERROR
      (+⍨⍣g)1 ⍝ power operator tries to apply g dyadically
SYNTAX ERROR

In general, Dyalog APL never examines a function operand to see whether it is monadic or dyadic, in order to treat them differently.

Jay.

reply via email to

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