An adjoint functor theorem