In a heavy medium saucepan, heat the milk just until steaming. In a large heatproof bowl, whisk the egg yolks with the sugar until pale. Whisk in the flour. Whisk in 1/2 cup of the hot milk, then whisk the egg mixture into the milk in the saucepan until blended. Cook over moderate heat, stirring constantly with a wooden spoon, until the custard comes to a boil and has the consistency of thick pancake batter, about 7 minutes. Transfer the custard to a bowl and press a piece of plastic wrap directly on the surface. Let the custard cool completely.