I derived a slower and more space-consuming function than Raul's,
using cut ( ;. ) , so won't bore you with it....

However,  in seeking a solution, I wondered how you wanted to treat
the case where the first item is zero, or the same as the left argument.

Raul's f :  (I'm forcing extra line feeds) ...

     1  f   1 0 2 3 4 5 0 0 0 4 3 2 4

1 0 2 3 4 5 0 0 0 4 3 2 4

... is a sensible, do-nothing, answer, but is it what you wanted?

Should it be

0 0 2 3 4 5 0 0 0 4 3 2 4

or

_ 0 2 3 4 5 0 0 0 4 3 2 4

or something else?

Mike

Matthew Brand wrote:
Thanks Raul.

On Wed, Oct 29, 2008 at 3:21 PM, Raul Miller <[EMAIL PROTECTED]> wrote:
On Wed, Oct 29, 2008 at 10:12 AM, Matthew Brand
<[EMAIL PROTECTED]> wrote:
  0 f 1 0 2 3 4 5 0 0 0 4 3 2 4
1 1 2 3 4 5 5 5 5 4 3 2 4
  f=: ] {~ ~: >./\@:* [EMAIL PROTECTED]@]

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

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


Internal Virus Database is out of date.
Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.8.3/1745 - Release Date: 25/10/2008 09:53


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

Reply via email to