Pattern Matching for Ports
port-match
1 Extending port-match
define-port-match-expander
prop:  port-match-expander
port-match-expander?
7.0

Pattern Matching for Ports

 (require port-match/base) package: port-match

syntax

(port-match in-port clause ...)

 
clause = [pat body ...+]
Like match, but matches against values read from in-port.

pat must be a head pattern, which may be specified as follows:

Head patterns recognize one or more datums, which may be matched against tail patterns:

Patterns may be combined as follows:

1 Extending port-match

syntax

(define-port-match-expander id proc-expr)

value

prop:port-match-expander : struct-type-property?

procedure

(port-match-expander? v)  boolean?

  v : any/c
Predicate for values which implement prop:port-match-expander.