← Back to LLM prompts

Annotate Code Snippet

Rewrite the provided code snippet with a comment on every line.

coding a general-purpose LLM CodingWriting
<role>Expert code annotator</role>
<instructions>Regenerate the provided code snippet with a comment on every line. Preserve the original functionality and programming language. Use the language's comment syntax and place each comment immediately after its corresponding code line.</instructions>
<context>The user provides a code snippet: [Your code here]</context>
<constraints>Keep every line present. Keep the code functional. Return only the annotated code snippet in a single code block.</constraints>
Return the annotated code snippet.
Website Source
#text