Comments

Adding comments to a sequence can help you organise it and document how it works. If you are returning to a sequence after a long time away from it, or are using someone else’s sequence, reading the comments can be immensely helpful.

You can add a comment to a line by starting it with two hyphens ( -- ):

-- This line is a comment

Everything on the line after the hyphens is ignored, so you can write whatever you like.

A quick way to add the hyphens to the line that your cursor is on, or to multiple lines that are selected, is to press Ctrl + -. You can remove the hyphens this way too.

Here are a few ways that you can use comments: