Hull and peel the coconut, reserving and straining the liquid.
Grate the meat (it should be medium-fine).
Measure the coconut liquid and add enough tap water to bring the total quantity to 1 cup.
Place the grated coconut in a medium-size, heavy saucepan, stir in the liquid and sugar and set over medium heat.
Cook, stirring frequently, until the coconut becomes transparent (it will look almost candied) and the liquid has reduced to a glaze, 20 to 30 minutes longer, to evaporate its liquid, then remove from the fire.
Beat the yolks with the milk or cream, stir in several tablespoons of the hot coconut, then carefully stir the warm yolk mixture into the coconut remaining in the pan.
Return to medium-low heat and stir constantly until lightly thickened, about 5 minutes.
Scrape the cocada into an ovenproof serving dish.
Spread the almonds onto baking sheet and toast in a 325 oven until lightly browned, about 10 minutes.
Shortly before serving, heat the broiler.
Dot the cocada with butter, run under the heat and let brown for a minute or so.
Watch carefully: The sugar in the cocada will caramelized very quickly.
Strew with the toasted almond slices and the dessert is ready to serve.
Rick's Notes: After the egg-yolk mixture goes into the hot coconut, make sure the heat under your pan isn't too high, or the yolks can curdle.
In no case should the coconut mixture come near a boil.