The Macaulay-Northcott functor