  A functor of sets $\mathbb X$ over the category of $K$-commutative algebras
is said to be an affine functor if its functor of functions, $\mathbb
A_{\mathbb X}$, is reflexive and $\mathbb X=\Spec \mathbb A_{\mathbb X}$. We
prove that affine functors are equal to a direct limit of affine schemes and
that affine schemes, formal schemes, the completion of affine schemes along a
closed subscheme, etc., are affine functors.
  Endowing an affine functor $\mathbb X$ with a functor of monoids structure is
equivalent to endowing $\mathbb A_{\mathbb X}$ with a functor of bialgebras
structure. If $\mathbb G$ is an affine functor of monoids, then $\mathbb
A_{\mathbb G}^*$ is the enveloping functor of algebras of $\mathbb G$ and the
category of $\mathbb G$-modules is equivalent to the category of $\mathbb
A_{\mathbb G}^*$-modules. Applications of these results include Cartier
duality, neutral Tannakian duality for affine group schemes, the equivalence
between formal groups and Lie algebras in characteristic zero, etc.
