RosettaCodeData/Task/Ordered-Partitions/J/ordered-partitions-3.j
2016-12-05 22:15:40 +01:00

22 lines
912 B
Text

+/\. 2 0 2
4 2 2
({@comb&.> +/\.) 2 0 2
┌─────────────────────────┬──┬─────┐
│┌───┬───┬───┬───┬───┬───┐│┌┐│┌───┐│
││0 1│0 2│0 3│1 2│1 3│2 3││││││0 1││
│└───┴───┴───┴───┴───┴───┘│└┘│└───┘│
└─────────────────────────┴──┴─────┘
>@,@{@({@comb&.> +/\.) 2 0 2
┌───┬┬───┐
│0 1││0 1│
├───┼┼───┤
│0 2││0 1│
├───┼┼───┤
│0 3││0 1│
├───┼┼───┤
│1 2││0 1│
├───┼┼───┤
│1 3││0 1│
├───┼┼───┤
│2 3││0 1│
└───┴┴───┘