The ornamental design for a cap for a writinginstrument, as shown and described.
FIG. 1 is a top view of the cap for a writing instrument.
FIG. 2 is a bottom view of the cap for a writing instrument.
FIG. 3 is a side view from the top of FIG. 1.
FIG. 4 is a side view from the bottom of FIG. 1.
FIG. 5 is an enlarged view from the right of FIG. 1.
FIG. 6 is an enlarged view from the left of FIG. 1; and,
FIG. 7 is a perspective view of the cap for a writing instrument.
The broken lines showing the inside in FIG. 6 are included for the purpose of showing portions of the cap for a writing instrument that form no part of the claimed design.