On this page:
5.1 mischief/  define:   Definition Forms
at-end
define-single-definition
define-if-unbound
define-values-if-unbound
define-syntax-if-unbound
define-syntaxes-if-unbound
define-provide-pre-syntax
define-unimplemented
unimplemented
unimplemented-out
5.2 mischief/  match:   Pattern Matching
match!
match*!
8.12

5 Definitions and Binding Forms🔗ℹ

5.1 mischief/define: Definition Forms🔗ℹ

 (require mischief/define) package: mischief-dev

syntax

(at-end body:expr ...)

Lifts the body definitions and expressions to the end of the enclosing module.

syntax

(define-single-definition define-one-id define-many-id)

Defines define-one-id in terms of define-many-id, where define-many-id defines multiple bindings similar to define-values and define-syntaxes, and define-one-id defines a single binding with shorthand for functions.

syntax

(define-if-unbound id expr)

(define-if-unbound (id . formals) body ...+)

syntax

(define-values-if-unbound {id ...} expr)

syntax

(define-syntax-if-unbound id expr)

(define-syntax-if-unbound (id . formals) body ...+)

syntax

(define-syntaxes-if-unbound {id ...} expr)

Variants of define, define-values, define-syntax, and define-syntaxes that define the given ids if they have no existing binding, and do nothing if the ids are already bound.

syntax

(define-provide-pre-syntax id expr)

(define-provide-pre-syntax (id . formals) body ...+)
Defines provide pre-transformers using define-syntax and make-provide-pre-transformer.

syntax

(define-unimplemented id ...)

Use this macro to define names that will be needed but are not yet implemented. Defines each id as a macro such that any reference raises an exception at run-time.

A macro that expands any references to an expression that raises an exception at run-time.

syntax

(unimplemented-out id ...)

A provide form that exports each id as a macro defined by define-unimplemented.

5.2 mischief/match: Pattern Matching🔗ℹ

 (require mischief/match) package: mischief-dev

syntax

(match! expr [pat body ...+] ...)

syntax

(match*! {expr ...} [{pat ...} body ...+] ...)

Variants of match and match* that include source locations in their error messages if no clauses match the inputs.