How do I do generate all possibilities to "partition"/ "split"/ "group" a list?
In:partitions[{1,1,2,3}]
Out:{
{{1,1,2,3}},
{{1},{1,2,3}},
{{1},{1},{2,3}},
{{1},{1},{2},{3}},
{{1,1},{2,3}},
{{1,1},{2},{3}},
{{1,1,2},{3}},
{{1},{1,2},{3}}
}
that is how do I get all possible "cuttings" of a list? In my case duplicates are relevant, so the list from In needs to be considered a list and has also order (only adjacent elements can become members of the same part of a partition). The order of the lists returned does not matter.
I think I must be missing something because there are Partition, Split and Grouping and none of them seems to do just cutting up a list in all possible ways.
thx in advance