Peel then cut the apple into small, 1cm cubes. Scatter them into a bowl and immediately squeeze some lemon juice over them. Add the cinnamon, flour, vanilla, sugar and walnuts. Mix well.
Roll the pastry out onto its packaging parchment paper. Using a large cookie cutter or a cup, cut out 6 circles. Using a pizza-cutter cut out 1cm wide long strips. Re-roll any scrap pieces of the dough if you need to need to cut out more circles or strips.
Place each circle of the pastry in the cavities of a standard muffin pan. Gently press the down pastry and around the sides. Fill them with the apple mixture then put a drop of margarine on top of each pie.
Using the strips, cut out long enough pieces to create a cris-cross or lettuce pattern on top of the pies, then pinch the edge of the pies together with the ends of the strips.
Put the tin with the ready-to bake pies in the fridge for 10-30 minutes. This will ensure a crunchy pastry.
While the pies are resting, preheat the oven to 200°C.
Bake the pies for 20- 25 minutes or until the crust is lightly golden brown and the filling is bubbly. Remove the tin from the oven and let the mini pies cool for 10 minutes, then transfer them to a wire rack.
Dust them with icing sugar and serve.