chickadee » variable-item » define-warning-variable

(define-warning-variable NAME INIT TYPENAME [BODY...])syntax

Wrapper around make-variable and warning-guard that defines the variable NAME to the variable.

NAME is an identifier.

INIT is some Scheme object.

TYPENAME is an identifier. The basename of a type predicate; see warning-guard.

BODY... as for warning-guard.

(use variable-item)

(define-warning-variable scale * procedure)
(scale 23) ;=> Warning: (foo) "bad argument type - not a procedure" 23