I have a list of vectors of two types. Each vector needs to be
processed by a monadic function according to the corresponding
element of a boolean. I'm trying to do this by constructing a gerund
and applying this item by item to the list (with an explicit or
implied pre-open and post-box). I'm stuck. For example:
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{g) apply list
3;4;3;19;2;5
Mike
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm