Put oven rack in upper third of oven and preheat oven to 425°F. Butter muffin cups. Peel and core apples, then cut into 1/3-inch dice.
Heat 2 tablespoons butter in a 12-inch heavy skillet over moderate heat until foam subsides, then cook apples, brown sugar, and lemon juice, stirring occasionally, until liquid is reduced to a glaze and apples are tender, 5 to 6 minutes.
Stir in walnuts and divide apple mixture among muffin cups.
Pulse together flour, cornmeal, granulated sugar, baking powder, and salt in a food processor until combined. Add remaining 4 tablespoons butter and pulse until mixture resembles coarse meal with some small (roughly pea-size) butter lumps.
Whisk together egg and milk in a large bowl. Add flour mixture and whisk until just combined.
Divide batter among muffin cups and bake until golden and a wooden pick or skewer inserted into center of a cake comes out clean, 15 to 20 minutes.
Run a paring knife around edge of each cake to loosen. Invert rack over muffin cups, then invert cakes onto rack. Serve warm with a dollop of whipped cream.