If  you do not mind losing any leading sequence
of a: another approach would be:
   (a:&~: (#;[EMAIL PROTECTED] # #) ])  mylist

If you do mind, you might use:
   (a:&~: (#;.1@(1&,)@[  # a:,#) ])&.(a:&,)  mylist

I believe that either of these would be faster, for large
sequences, than the other proposed alternatives.
(But I have not actually bothered to test, so I
might be wrong.)

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

Reply via email to