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

Reply via email to