return returns a value from the nearest enclosing function.

Syntax

(return)
(return value)

Semantics

  • Returns the value from the nearest enclosing function.

Example

(define (f x)
  (when (even? x)
    (return Even))
  Odd)