[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] box and unbox that work uniformly and without exceptions
From: |
Jay Foad |
Subject: |
Re: [Bug-apl] box and unbox that work uniformly and without exceptions |
Date: |
Wed, 14 May 2014 16:44:58 +0100 |
That's because of a bug in GNU APL:
x←(1 2)(3 4)
(a b)←x
a≡1 2
0
:-(
Jay.
On 14 May 2014 15:24, Blake McBride <address@hidden> wrote:
> Your unbox doesn't work. The following does:
>
> (s r)←⊃x ⋄ z←(⊃s)⍴⊃r
>
>
> On Wed, May 14, 2014 at 3:43 AM, Jay Foad <address@hidden> wrote:
>>
>> On 13 May 2014 15:00, Blake McBride <address@hidden> wrote:
>> > Here are the functions, examples to follow:
>> >
>> > ∇box[⎕]∇
>> > [0] z←box x
>> > [1] z←⊂(⊂⍴x),⊂,x
>> >
>> > ∇unbox[⎕]∇
>> > [0] z←unbox x
>> > [1] z←(⊃x[⎕IO])⍴⊃(x←⊃x)[⎕IO+1]
>>
>> FYI you can write your box as: z←⊂(⍴x)(,x)
>> and unbox as: (s r)←⊃x ⋄ z←s⍴r
>>
>> Jay.
>
>
Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Frederick H. Pitts, 2014/05/16
- Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Blake McBride, 2014/05/17
- Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Blake McBride, 2014/05/17
- Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Blake McBride, 2014/05/17
- Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Frederick H. Pitts, 2014/05/18
- Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Elias Mårtenson, 2014/05/18
- Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Blake McBride, 2014/05/18
- Re: [Bug-apl] box and unbox that work uniformly and without exceptions, Frederick H. Pitts, 2014/05/18