Prepare the custard: Beat the egg yolks in a heavy medium-size saucepan. Add the cornstarch and sugar, and mix well. Then stir in the milk, salt, and butter.
Cook the egg mixture over medium heat, stirring constantly, until it is bubbling and thick, 5 to 7 minutes.
Remove the pan from the heat and stir in the vanilla. Transfer the mixture to a glass b