spd5 and spdj also had overtake.
Anyway, I would use with explicit rather than tacit
in this case, but rewritten slightly. And I would
rename it "up" from "spread" or "spd", because in
use it would be 5 up xyz etc.
up=: 4 : ',./s$(*/s){.y [ s=. x,>.(#y)%x'
"up" makes it evident that the operations are ,./
and shape and (over-)take. By the way, ,./ is
supported by special code:
http://www.jsoftware.com/help/release/stitchsl.htm
A long time ago, I had a version in which the
left argument is a 2-element integer vector (r,c)
where r is the number of rows and c is the number
of columns, and the result is a 3-d array. Each
plane is a "page" with r rows and c columns of the
items, and on each page your eyes scan primarily up
and down. For example, 5 3 up ' ',.~>nl_z_ 3
would look like:
Note break cocurrent
apply bx codestroy
assert clear coerase
boxopen coclass cofullname
boxxopen cocreate coinsert
coname coreset edit
conames cutopen empty
conew datatype erase
conl do exit
copath drop expand
...
The details of this more general "up" are left as
an exercise for the reader.
----- Original Message -----
From: Ralph G Selfridge <[EMAIL PROTECTED]>
Date: Monday, February 19, 2007 8:18 am
Subject: Re: [Jprogramming] Style and Literacy in APL
> I offer what I had written. I use overtake rather than $
>
> r=:[: ,./((-@>.@(%~#))]\([*>.@(%~#)){.])
>
> On Sun, 18 Feb 2007, Roger Hui wrote:
>
> > spd5=: 4 : 0
> > ,./ s $ (*/s=. x,>.(#y)%x){.y
> > )
> >
> > spdj=: [: ,./ ([ , >.@(%~#)) ([ $ */@[ {. ]) ]
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm