in a bowl, using electric beater, beat together the butter and icing sugar. Incorporate the eggs and continue beating.
With a wooden spoon, stir in the flour and ground almonds. If desired, add a few drops of almond extract and mix well.
Line a 9 inch pie plate with the pie dough. Fill the pie shell with half the apples and half the raspberries. With a spatula, cover the fruit with the frangipane (almond preparation). Arrange the remaining apples slices neatly around the edges of the pie and place the rest of the raspberries in the centre. Sprinkle with sugar.
Bake in the centre of the oven for 40-50 minutes, or until the frangipane is golden-brown and slightly firm to the touch. Let the pie cool on a wire rack before slicing it.