Thank you everybody. That's turned the hay over in my mind. I really ought to know my standard J manuals better... The very first example of Phr: 5B. Partition http://jsoftware.com/help/phrases/partition.htm -essentially answers my question. Left argument to Cut (;.) -- a blind spot for me.
On Tue, Oct 9, 2012 at 3:32 PM, Ian Clark <[email protected]> wrote: > 1. Suppose: > az=: 'abcdefghijklmnopqrstuvwxyz' > i=: 3 2 5 8 5 3 NB. -(for example) > > How best can I partition az into parts pp where (n{pp) has length (n{i) ? > viz. > pp -: 'abc';'de';'fghij';'klmnopqr';'stuvw';'xyz' > > 2. Suppose instead of (i) I have a boolean (b) marking where to cut az ... > b =: 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 > (c/f dyadic {enclose} in APL+) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
