Quarter and core the apples (no need to peel) and cut each quarter in half again. In a large frying pan, melt the butter, then add the apples, sugar, lemonzest and juice and the squeezed-out lemon halves and bay leaf. Carefully stir everything to combine, then cover and cook gently for about 10 mins or until the apples are just soft.
Remove the lid and turn the heat to high. Allow the mixture to cook, uncovered, for a further 5 mins, or until most of the excess liquid has evaporated. It should be juicy and syrupy. Remove the lemon halves and bay, stir in the brandy, if using, and leave to cool slightly. Stir in the walnuts and serve warm.