The perfection of an intellective operation in a man
consists in a certain sort of abstraction
from sensible phantasms.
And so the more free a man’s intellect
is from phantasms of this sort,
the better he is able to think about intelligible things
and to order all sensible things
— just as Anaxagoras likewise claimed that
the intellect has to be ‘unmixed’ in order to command,
and just as an agent has to be dominant
over matter in order to be able to move it.
Now it is obvious that pleasure directs one’s attention
to the things that he takes pleasure in.
Hence, in Ethics 10 the Philosopher says that
each individual does those things best that he takes pleasure in,
whereas the contrary things he does feebly or not at all.
Now the carnal vices, viz., gluttony and lust,
have to do with the pleasures of touch, viz.,
the pleasures of food and sex,
which are the most vehement among all the corporeal pleasures.
And so through these vices
a man’s attention is especially directed to corporeal things and,
as a result, the man’s operation with respect to intelligible things
is weakened — and more through lust than through gluttony,
to the extent that the pleasures of sex are more vehement than those of food.
And so lust gives rise to blindness of mind, which, as it were,
totally excludes the cognition of spiritual goods,
whereas gluttony gives rise to dullness of sense,
which renders a man weak with respect to intelligible things of this sort.
Conversely, the opposite virtues, viz.,
abstinence [from food] and chastity,
especially dispose a man toward the perfection of intellectual operation.
Hence, Daniel 1:17 says,
“To these young men,” viz.,
those who abstained [from meat] and were continent,
“God gave knowledge and learning in every book, and wisdom.”
St. Thomas Aquinas's Summa Theologiae, Part II-II, q. 15, a. 3