(I think this message constitutes a spoiled spoiler..)

On 3/13/08, Roger Hui <[EMAIL PROTECTED]> wrote:
> What was the solution you anticipated?

I was cleaning up my solution for presentation
purposes, and I ran into a problem:
   tclose=: 3 : '{&y^:a:i.#y'
   ]m=: |.tclose ?.1>.i.10
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 1 1 0
0 0 0 0 1 2 1 2 2 1
0 0 1 1 2 4 2 4 4 2
0 1 2 3 4 5 6 7 8 9
   _1{|.tclose ?.1>.i.10
7 8 9 0 0 0 0 0 0 0 0
  ({:@{: -: {:@,) m
0

This happens to me in both J601 and J602, and I do not
understand why I was not having this problem earlier,
and I have already overwritten my earlier versions of
my code.

Also, I am now having similar problems with for loops.

Anyways, my basic approach might have been expressed
something like this (except that this does not work)
   trmerge=: ([EMAIL PROTECTED]@] , [) <@~.@;/. ,[EMAIL PROTECTED]
   trinds=: trmerge/@|[EMAIL PROTECTED]
   trsum=: <@[ +/@:{~&> [EMAIL PROTECTED]
   (?.100+i.10) trsum ?.1>.i.10

FYI,

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

Reply via email to