Function to construct a nested group where at most some of the criteria or groups must be satisfied

nestedWithAtMost(x, ...)

Arguments

x

an integer specifying the number of criteria or groups that must be satisfied

...

a set of criteria or groups