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: Juergen Sauermann
Subject: Re: [Bug-apl] Unexpected result when attempting to enclose over rows
Date: Wed, 27 Apr 2016 17:56:13 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi,

thanks, fixed in SVN  724.

/// Jürgen


On 04/26/2016 01:41 PM, Jay Foad wrote:
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]