bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] IOTA


From: Juergen Sauermann
Subject: Re: [Bug-apl] IOTA
Date: Thu, 03 Mar 2016 12:40:46 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi,

the IBM APL2 language reference says (page 111):

If R is a simple scalar, ⊂R is R. If R is not a simple scalar, the depth of R is 1+ ≡R.

And the ISO standard says the same (page 169):

Z ← ⊂B
 Note: If B is a simple-scalar, Z is B.

Therefore I believe Elias' statement

My understanding was that (⊂⊂x)≡⊂x for all x?

is correct as far as ISO, IBM APL2, and GNU APL are concerned.

/// Jürgen


On 03/03/2016 10:21 AM, Jay Foad wrote:
On 3 March 2016 at 08:12, Elias Mårtenson <address@hidden> wrote:
What is the purpose of the double-enclose ⊂⊂⍬ ?

My understanding was that (⊂⊂x)≡⊂x for all x?
No! ⊂ is a no-op on simple scalars like 42, but not on enclosures like
⊂⍬. You can enclose most arrays (i.e. anything except simple scalars)
as many times as you like, and they keep getting deeper and deeper.

Hmm, now I see that GNU APL seems to be broken. In APL2 and Dyalog and
NARS2000 I get:

      ≡⊂⊂⊂⊂⊂⊂⊂⊂⊂'elias'
10

But in GNU APL:

      ≡⊂⊂⊂⊂⊂⊂⊂⊂⊂'elias'
2

Jay.



reply via email to

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