Put the grated coconut in a saucepan and add the sugar and milk. Bring to the boil and cook about 5 minutes. Let cool.
Strain the liquid through a piece of cheesecloth and squeeze the coconut meat to extract as much liquid as possible. Reserve 2cups of the grated meat and discard the rest or put it to another use.
Put the egg yolks in a mixing bowl and beat with a whisk. Beat in the sweetened liquid and scrape the mixture into a saucepan and heat. Use a wooden spoon and stir constantly, this way and that, making certain that the spoon touches all over the bottom of the saucepan. Cook until the mixture has a custardlike consistency and coats the sides of the spoon (180 degrees). Do not let the sauce boil, or it will curdle. This cooking will rid the custard of the raw taste of the yolks.
Immediately remove the sauce from the heat and continue stirring. Set the saucepan in a basin of cold water to reduce the temperature. Let the sauce cool to room temperature.
Pour the custard into the container of an electric or hand-cranked ice cream maker. Partly freeze according to the manufacturer’s instructions. Add the reserved 2cups coconut pulp and continue freezing until solid.