bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Unexpected result when attempting to enclose over rows


From: Jay Foad
Subject: Re: [Bug-apl] Unexpected result when attempting to enclose over rows
Date: Tue, 26 Apr 2016 12:41:21 +0100

I agree that this seems like a bug. Your example works in NARS2000 and
Dyalog. To make it work in GNU APL I currently have to do an extra
enclose:

      ({⊂⊂⍵}⍤1)z,⍪z←⍳4
┌→──────────────────────┐
│┌→──┐ ┌→──┐ ┌→──┐ ┌→──┐│
││1 1│ │2 2│ │3 3│ │4 4││
│└───┘ └───┘ └───┘ └───┘│
└∊──────────────────────┘

On 26 April 2016 at 11:38, Elias Mårtenson <address@hidden> wrote:
> Given the following definition:
>
>       z←⍳4
>
> I was trying to generate the following:
>
> ┏→━━━━━━━━━━━━━━━━━━━━━━┓
> ┃┏→━━┓ ┏→━━┓ ┏→━━┓ ┏→━━┓┃
> ┃┃1 1┃ ┃2 2┃ ┃3 3┃ ┃4 4┃┃
> ┃┗━━━┛ ┗━━━┛ ┗━━━┛ ┗━━━┛┃
> ┗∊━━━━━━━━━━━━━━━━━━━━━━┛
>
> I attempted to do the following:
>
>       (⊂⍤1) z,⍪z
>
> I expected this to work, because z,⍪z is:
>
> ┏→━━┓
> ↓1 1┃
> ┃2 2┃
> ┃3 3┃
> ┃4 4┃
> ┗━━━┛
>
> Then, (⊂⍤1) should run enclose on each row.
>
> But, instead of getting the expected result, the application of enclose over
> the rows returns the original result:
>
>       (⊂⍤1) z,⍪z
> ┏→━━┓
> ↓1 1┃
> ┃2 2┃
> ┃3 3┃
> ┃4 4┃
> ┗━━━┛
>
> Any ideas why?
>
> Regards,
> Elias

reply via email to

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