On this page:
8.1 Dispatch
define-enum-bidi-match-expander
8.18.0.15

8 Web🔗

8.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"