Does https://rosettacode.org/wiki/Combinations_with_repetitions#J_Alternate_implementation satisfy this request?
Thanks, -- Raul On Tue, May 10, 2016 at 12:40 AM, Skip Cave <[email protected]> wrote: > 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
