In a mixing bowl, cream butter, sugar, and egg.
In a separate bowl, combine the flour, baking powder, baking soda, and cinnamon.
Gradually add the creamed mixture, beating until just combined.
Stir in the apple and walnuts.
Pour into a greased 8-inch square baking dish. Bake at 350 degrees Fahrenheit for 35-40 minutes or until an inserted toothpick in the center comes out clean.