Comment your code. A common convention is to use one semicolon
for a comment that follows code on the same line, and two semicolons
for comments that are on a line of their own, indented as the code that
is described. (Some people use three semicolons for toplevel comments,
but this is less common.) The way to think about this is that the
number of semicolons used roughly corresponds to the length of the
comment. In addition, you can have a multi-line comment #|...|#
(for example, write more free-form explanations, or comment out pieces
of code). The text of a comment should be separated from the
comment delimiters exactly one space.
An example that demonstrates all of these conventions:
;;; This function implements the square search loop.
;;; It keeps improving an initial guess until the
;;; value is good enough.
(define (try guess x)
;; If it's a good guess return it, otherwise, improve
(if (good-enough? guess x)
(try (improve guess x) x))) ; loop back
(< 3.99 (try 2 0) 4.01)