On Wed, Oct 22, 2008 at 8:04 AM, Alex Rufon <[EMAIL PROTECTED]> wrote:
> So how would you convert this to a one line or tacit definition?

You can put this all on one line by stringing the lines
together.  Most of them work "as is", but your final line
needs to be re-arranged slightly (using parenthesis and ~).
   (,csump),.~dper=.2{."1 temp#~#"1 csump=. 2}."1 temp=.i.2 5
0 1 2
0 1 3
0 1 4
5 6 7
5 6 8
5 6 9

You can convert this to a tacit definition by replacing temp
with y and wrapping the resulting expression in 13 :''.  Or, at
least, that should work (sometimes we find bugs in 13 :)

And if you have your J session configured to give you linear
representation of non-noun results then you should be able
to read the resulting verb:

   13 :'(,csump),.~dper=.2{."1 y#~#"1 csump=. 2}."1 y'
(2 }."1 ]) (([: , [) ,.~ ]) ] (2 {."1 [ #~ #"1) 2 }."1 ]

Unfortunately, this is one of the cases where 13 : does
not work:

   (13 :'(,csump),.~dper=.2{."1 y#~#"1 csump=. 2}."1 y')i.2 5
|length error

So here's a manual transliteration:
   (] (,@] ,.~ 2 {."1 (#~ #"1)) 2&}."1) i.2 5
0 1 2
0 1 3
0 1 4
5 6 7
5 6 8
5 6 9

And here's a slightly simpler approach
   2 ({."1 ,/@:(,"1 0) }."1)i.2 5
0 1 2
0 1 3
0 1 4
5 6 7
5 6 8
5 6 9

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to