Comments are helpful descriptions of line or block code that assist developers in better understanding the code.
It makes code maintenance easier for various developers.
Various comment types are supported by the Lisp language.
- Inline and single-line comments
- Comments with several lines or multi-lines in a block
Single Line Comments
Single-line comments are added to a single line. It can be added at the start or any position of a line
In Lisp, Single line comments always start with a double semicolon followed by comment text
Here is an example
;; single-line comment text
Multi lines or block comments in Lisp
Multi-line comments start with #|
followed by multiple lines and end with |#
#|
Comment text1
Comment text2
Comment text3
|#
Comments are ignored by the compiler during compilation.