|
From: | Blake McBride |
Subject: | Re: [Bug-apl] box and unbox that work uniformly and without exceptions |
Date: | Wed, 14 May 2014 09:24:30 -0500 |
On 13 May 2014 15:00, Blake McBride <address@hidden> wrote:FYI you can write your box as: z←⊂(⍴x)(,x)
> 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]
and unbox as: (s r)←⊃x ⋄ z←s⍴r
Jay.
[Prev in Thread] | Current Thread | [Next in Thread] |