Actually... ac is a wrapper for revise, which supplies a value for ys (which is the same thing as xs) which initially takes the value i.#D which is i.n but this changes over time... I need to think about this pattern.
But for the moment, since the right argument to revise is a pair, and it's used in ^: it makes sense to leave that part alone. So, perhaps: revise=:1 :0 : A=. x C=. m 'xs D'=. y ... ) This means recomputing 'a' in every inductive step, but I do not yet have a good enough of an understanding of the algorithm to begin to think about efficiency issues. -- Raul On Sun, Nov 4, 2012 at 1:40 PM, Raul Miller <rauldmil...@gmail.com> wrote: > On Sun, Nov 4, 2012 at 12:53 PM, Mike Day <mike_liz....@tiscali.co.uk> wrote: >> I think Raul has overlooked your use of the right argument ys within that >> verb, ... > > You are right, I had not even tried to read 'revise'. > > Looking at it now, it has a signature: > > NB.* '(A;a;<C) revise (xs;D)' filter domains of all variables (ys) adjacent to > > > And then a bunch of code to unpack those arguments. > > I think for an initial draft at least, I would try to use a > conjunction so that my arguments would come "pre-packaged". A bare > conjunction can deal with four arguments without any packing or > unpacking. And we know we can compute a from A, so, perhaps: > > A C revise xs D > > If we want to keep the same names: > revise=:2 :0 > : > A=. x > C=. m > xs=. n > D=. y > ... > ) > > Note that we need the line with just a colon because we want to define > a dyadic verb as the result of our conjunction. > > Now to read the rest of it... > > -- > Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm