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 <jay.f...@gmail.com> wrote:

> On 13 May 2014 15:00, Blake McBride <blake1...@gmail.com> 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.
>

Reply via email to