This is an instance where the n v v construct comes in handy: f=: + _*0=]
----- Original Message ----- From: Rob Hodgkinson <[EMAIL PROTECTED]> Date: Thursday, September 18, 2008 2:42 Subject: Re: [Jprogramming] Applying Amend on each row To: Programming forum <[email protected]> > An alternative is also the approach to 'add infinity where 0 > = > temp') ... > > rplc0byInf =: [ + _&* @ (0&=) > > rplc0byInf temp > 5 7 _ _ _ > 3 6 _ 5 4 > > But this doesn't address your general Amend / Tacit query like > Ric's > solution... > > .../Rob Hodgkinson > > On 18/09/2008, at 6:44 PM, Alex Rufon wrote: > > > > ... > > As you can see, this works: > > [temp=. 2 5 ? 10 > > 5 7 0 0 0 > > 3 6 0 5 4 > > _ amendEachZero temp > > 5 7 _ _ _ > > 3 6 _ 5 4 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
