On this page:
9.1 Dispatch
define-enum-bidi-match-expander
9.1.0.9

9 Web🔗

9.1 Dispatch🔗

 (require toolbox/web/dispatch) package: toolbox-web-lib

syntax

(define-enum-bidi-match-expander id syms-expr)

 
  syms-expr : (listof symbol?)
Binds id as a bi-directional match expander like symbol-arg, but additionally constrained to be one of the symbols in the list produced by syms-expr.

Examples:
> (define-enum-bidi-match-expander language-arg '(racket rhombus))
> (match "racket" [(language-arg l) l])

'racket

> (match "rhombus" [(language-arg l) l])

'rhombus

> (match "cheesecake" [(language-arg l) l])

match: no matching clause for "cheesecake"