chickadee » moremacros » define-checked-parameter

(define-checked-parameter NAME INIT TYPENAME [BODY...])syntax

Wrapper around define-parameter and checked-guard that defines the variable NAME to the parameter.

NAME is an identifier.

INIT is some Scheme object.

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

BODY... as for checked-guard.

(use parameter-item)

(define-checked-parameter scale * procedure)
(scale 23) ;=> Error: (foo) "bad argument type - not a procedure" 23