Here's a limited solution -- for the case where you want
to split the possibilities into two equal sized partitions:

halves=: (] #~ -:@[ = +/"[EMAIL PROTECTED])  [: #:@i. 2&^&.<:

Usage example:
   halves 12

There might be some way to represent more complex
cases as a subset of linear combinations of a variation
on this mechanism.

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

Reply via email to