The approach I took to writing "guard" is one that works regardless of 
noun rank.  To summarize it in English:
   Insert the argument into the center of a matrix sized two greater on each 
axis.

   guard=: 3 :'(,y) (<"1 >:($y) #:"1 ,: i.*/$y) } 0$~2+$y'

There may be a better way to denote "the center of" but the one I used here 
seems straightforward.

I, too, hoped to define this tacitly but cannot.  My difficulty comes 
from not understanding how to work with an argument within this structure.

The general structure of the verb is
c b} a
where c, b, and a denote phrases that all require data from the 
parameter.  Referring to that data in (c) and (a) is easy (i.e. use ]), but
I'm confused by the verb (b}) when trying to make this tacit. It seems to 
me that ] used within (b) would denote (a), not the original parameter. Is 
that so?  If so, can the original parameter be tacitly incorporated into 
(b)?  Perhaps the clearest way to make this tacit involves a multiple 
definitions?


Tracy


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

Reply via email to