We consider functions of <italic>p</italic>2-valued logic (<italic>p</italic> is prime) that may be implemented by polynomials over the ring ℤ<italic>p</italic>2, and describe all closed classes that contain linear functions. It turns out that the set of these classes is countable. We also construct the lattice of such classes with respect to inclusion.