Using a paring knife, remove the cores and trim about a 1/2-inch slice from the bottom of each apple, so they sit flat. Place the apples in an ovenproof skillet or 8- to 9-inch baking dish. Drizzle with the syrup. Divide the walnuts and raisins among the apples, filling the cavities, and place any extra in the dish. Dot the apples with the butter. Bake until tender, 40 to 50 minutes.
If using a baking dish, pour the liquid from the dish into a skillet. Bring to a boil over medium heat. Cook until it thickens slightly, 2 to 3 minutes. Spoon the sauce over the warm apples and serve with the ice cream, if desired.
Tip: Gala and Rome Beauty apples are ideal for baking because they retain their shape.