Tacitly:
(([: ; ] {.&.> 1:) <;.1 >@[)`([: I. ] > 0:)`(] {.&.> 1:)}
(i.10)(([: ; ] {.&.> 1:) <;.1 >@[)`([: I. ] > 0:)`(] {.&.> 1:)}1 2 3 0 4
+-+---+-----++-------+
|0|1 2|3 4 5||6 7 8 9|
+-+---+-----++-------+
(i.0)(([: ; ] {.&.> 1:) <;.1 >@[)`([: I. ] > 0:)`(] {.&.> 1:)}0 0 0
++++
||||
++++
R.E. Boss
-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Leigh J. Halliwell
Verzonden: donderdag 2 november 2006 18:51
Aan: 'Programming forum'
Onderwerp: RE: [Jprogramming] Boxing according to a Pattern
Dear J Forum:
Thanks for your suggestions. But I worked around it, and arrived at just
what I needed:
BoxAccTo =. 4 : '((;z) <;.1 >x) (I. y>0)} z =. y{. each 1'
It's not as pretty, and can't be tacitly coded. But I wonder how its
efficiency compares with the earlier attempt.
Sincerely,
Leigh
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of bill lam
Sent: Thursday, November 02, 2006 11:34 AM
To: Programming forum
Subject: Re: [Jprogramming] Boxing according to a Pattern
Leigh J. Halliwell wrote:
> (i.0) (4 : '(,y~:0) expand x<;.1~;y{. each 1') 0 0 0
> 0 0 0
>
> I would like it in this case to be three empty boxes. Can I make the
expand operator fill with empty boxes?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm