In a large soup pot, over medium heat, melt the butter. Whisk in the flour and keep whisking until the mixture darkens but does not burn, 4 to 5 minutes. This is called making a roux.
Add the onion, carrot, and celery and stir occasionally until the veggies begin to soften, 5 to 6 minutes.
Add the corn, salt, and cayenne pepper to the pot and cook, stirring, for another 2 or 3 minutes. (If using frozen corn, add a minute to the cooking time)
Pour in the stock and milk and bring to a boil. Lower the heat and simmer for 10 minutes, until thickened.
Partially puree the house by transferring only half to a countertop blender, then returned the puree to the pot, or by sticking a hand immersion blender in the pot and briefly pureeing for less than a minute. Ladle into soup bowls and serve warm or freeze in individual portions for another day.