Combine sugar, cocoa, and water in a saucepan and stir until sugar is dissolved.
Add butter; set a candy thermometer in place and cook, without stirring, to 234 to 236F (soft-ball stage).
Cool to 110°F.
Add extract and beat until almost creamy.
Stir in walnuts; drop from teaspoon onto waxed paper.
Or, turn into a buttered pan and when cooled, cut as desired.