While we are discussing permutations and combinations....
I haven't been able to find any mention in the J doc about a verb that
gives all possible combinations with replacement.
For example:
2 combr 1 2 3
┌───┬───┬───┬───┬───┬───┐
│ 1 1 │ 1 2 │ 1 3 │ 2 2 │ 2 3 │ 3 3 │
└───┴───┴───┴───┴───┴───┘
3 combr 1 2 3
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│ 1 1 1 │ 1 1 2 │ 1 1 3 │ 1 2 2 │ 1 2 3 │ 2 2 2 │ 2 2
3 │ 1 3 3 │ 2 3 3 │ 3 3 3 │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
Can someone point me to the right section of the J doc?
Skip
Skip Cave
Cave Consulting LLC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm