1. Heat the sugar and water and cook uncovered until syrup forms a soft ball in cold water. Add the coconut and stir in the egg yolks. Add the cinnamon and sherry and cook over low heat, stirring constantly with a wooden spoon, until the mixture is thick.
2. Pour into a flame-proof serving dish. Put under the grill to brown the top. Serve with plain or whipped cream.