In a large saucepan, over medium heat, bring the milk to boiling. (Milk begins to rise as it comes to a boil, so you want to keep your eye on it.)
3 c. milk
Meanwhile, mix the sugar, cornstarch, flour, cocoa, and salt.
1 c. sugar, 3 1/2 Tbsp. cornstarch, 2 Tbsp. all-purpose flour, 4 Tbsp. unsweetened cocoa powder, 1/2 tsp. salt
Add the egg yolks and one cup of the hot milk to the cornstarch mixture, and mix until creamy.
3 large egg yolks
Slowly, while whisking, pour the egg/cornstarch mixture into the hot milk. Bring it to a full boil. (Be careful, because boiling pudding can splatter.)
Remove from the heat and add butter and vanilla. Stir until the butter is melted and combined. Set aside to cool.
2 Tbsp. butter, 1 tsp. vanilla extract
Pour the cooled pudding into a 9" pre-baked pie crust. Refrigerate to chill.
1 pre-baked (9") pie crust
Top with whipped cream and serve. Store any leftovers, loosely covered, in the refrigerator for up to 5 days.