01 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
02 - In a medium bowl, whisk together the flour, baking soda, salt, cinnamon, and nutmeg. Set aside.
03 - In a large bowl, beat the softened butter, brown sugar, and granulated sugar together until light and fluffy.
04 - Beat in the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
05 - Gradually add the dry ingredient mixture to the wet ingredients, mixing until just combined. Do not overmix.
06 - Fold in the rolled oats, raisins, diced apple, and chopped walnuts if using, until evenly distributed throughout the dough.
07 - In a small bowl, stir together the melted butter, brown sugar, and ground cinnamon until smooth and well blended.
08 - Drop rounded tablespoons of dough onto the prepared baking sheets, spacing them about 2 inches apart.
09 - Drizzle a small amount of the cinnamon swirl mixture over each cookie. Use a toothpick or knife tip to gently swirl it into the dough.
10 - Bake for 11 to 13 minutes, until the edges are golden and the centers are set.
11 - Let the cookies cool on the baking sheets for 5 minutes, then transfer to a wire rack to cool completely.