Mike Powell wrote:
> b =: 0 1 1 0 1 1
> g=:+/`$
> list=:1 2;3 4 5 6;8 8 8; 9 2 4 1 3;1 2; 5 5 5 5 5

  b [EMAIL PROTECTED]@.[&.> list

(this uses the undocumented [EMAIL PROTECTED] notation).

> 3;4;3;19;2;5

Except, it's not quite that -- the result of $ is a
one element list, so your result is really
  3;(,4);(,3);19;(,1);(,1)

Or you could change g to +/`#

-- 
Raul

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

Reply via email to