The ListBlocK adverb can be substituted for lb in both your examples, but I think I was wrong about the v/ u lb equivalence.
I'm still not sure the conjunction form is needed, since your way of accumulating or reducing as part of the operation on each list portion seems about equally workable. regarding memory, the suffix adverb probably doesn't free up no longer needed begining of the lists as it moves forward through it... it would account for the nearly exact double the memory use. > It seems that the equivalence is not exact. > However, > > < @: (-.@:i.) lb 1 3 2 4 3 1 1 2 NB. Raw list of > subsequent duplicates > +-------------+-----------+---------+-------+-----+---+-+ > |0 0 0 0 1 1 0|0 0 1 0 0 0|0 0 0 0 1|0 0 0 0|0 0 0|1 > 0|0| > +-------------+-----------+---------+-------+-----+---+-+ > +/"1 @: (-.@:i. lb) 1 3 2 4 3 1 1 2 NB. Count of > subsequent duplicates > 2 1 1 0 0 1 0 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
