On 6/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
dcat =. 1 : 0
NB. no monad needed
:
x. , m. , y.
)
This seems a bit more concise (and should also work under J5,
which I'm guessing you are still using):
dcat=:1 :', m&,'
I was also thinking that your dcat wouldn't work on boxed strings, but
then it occurred to me that it would.
', 'dcat L:0/ ":&.>1 2 3 4
But this approach seems slow.
6!:2'99 dcat/v'[v=:i.1e4
0.355551
Compare with:
dcr=:1 :'}:@(1j1&(#!.m))'
(99 dcat/ -: 99 dcr)v
1
6!:2'99 dcr v'[v=:i.1e4
0.00952272
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm