Generously butter and line a 12 X 8 X 1 inch baking tin. Preheat oven to 180*C/350*F.
Peel, core and thinly slice the apples and toss in the lemon juice. Set aside.
Sift the flour and baking powder into a bowl. Add the butter pieces and rub in until the mixture resembles fine crumbs. Stir in the caster sugar and the grated lemon zest.
Combine the egg and milk, mixing with a fork to break up the egg. Add to the dry ingredients, stirring with a wooden spoon to combine, then beat for 1 minute to get a soft cake batter. Turn the mixture into the prepared tin and spread evenly over the base.
Brush the cake batter with the melted butter. Top with the apple slices in neat overlapping rows to cover all the batter. Scatter with the pecans, if using. Mix the granulated sugar and cinnamona nd sprikle evenly over the whole surface. Bake for 40 minutes.
REmove from the oven and allow to cool for 10 to 15 minutes. Cut into squares and serve warm with ice cream.