A Generalization of a Combinatorial Theorem of Macaulay