The object contract is a method function.
The source of this document is in Macaulay2Doc/functions/contract-doc.m2:6:0.