I'm looking for straightforward way to find all the partitions of a set.
IntegerPartitions seems to provide a useful start. But then things get a bit complicated.
Imagine we want to find all the ways to partition a list:
IntegerPartitions gives the some breakdowns, by numbers of elements in each subset.
The following function,
g, takes the list and the breakdowns, outputting some useful results (but clearly not all possible results).
I suspect that there may be some better alternatives to
g. Perhaps even a straightforward list-manipulation command.
BTW, we would need to use all permutations of
myList to ensure we have all the partitions.
Permutations[myList] would be instrumental for that: