The ornamental design for cap for writing instrument, as shown and described.
FIG. 1 is a front perspective view of an ornamental design of a cap for writing instrument according to the present invention;
FIG. 2 is a left side plan view thereof;
FIG. 3 is a right side plan view thereof;
FIG. 4 is a back side view thereof;
FIG. 5 is a front side view thereof;
FIG. 6 is a top view thereof;
FIG. 7 is a bottom view; and,
FIG. 8 is another front perspective view thereof.
The broken lines in the drawings are included for the purpose of illustrating the environment of the design and portions of the article that form no part of the claimed design.