On this page:
when
unless

2.16 Guarded Evaluation: when and unless

+Effects If...: when and unless in Guide: Racket introduces when and unless.

(when test-expr expr ...)
Evaluates test-expr. If the result is #f, then the result of the when expression is #<void>. Otherwise, the exprs are evaluated, and the last expr is in tail position with respect to the when form.

Examples:

  > (when (positive? -5)
      (display "hi"))
  > (when (positive? 5)
      (display "hi")
      (display " there"))

  hi there

(unless test-expr expr ...)
Equivalent to (when (not test-expr) expr ...).

Examples:

  > (unless (positive? 5)
      (display "hi"))
  > (unless (positive? -5)
      (display "hi")
      (display " there"))

  hi there