par =: 2 (}. i.)&.>/\"1 0: ,. (comb&.<:) ,. ]
Henry Rich On 10/19/2017 9:53 AM, 'Skip Cave' via Programming wrote:
Design a dyadic function 'par' that will partition y items into x partitions. For example: 3 par 5 ┌─────┬─────┬─────┐ │0 │1 │2 3 4│ ├─────┼─────┼─────┤ │0 │1 2 │3 4 │ ├─────┼─────┼─────┤ │0 │1 2 3│4 │ ├─────┼─────┼─────┤ │0 1 │2 │3 4 │ ├─────┼─────┼─────┤ │0 1 │2 3 │4 │ ├─────┼─────┼─────┤ │0 1 2│3 │4 │ └─────┴─────┴─────┘ Skip Cave ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
--- This email has been checked for viruses by AVG. http://www.avg.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
