ERights Home elang / kernel 
Back to: Such-That Pattern On to: Tuple Pattern

List Pattern


Written as a list of sub-patterns. Matches a specimen iff the specimen is a list with exactly the same number of elements, and each subpattern matches the corresponding element.

BNF:
"[" [pattern ("," pattern)*] "]"
XML DTD:
<!ELEMENT listPattern ((%pattern;)*)>
Java:
 
Example:
see matchBindExpr
in Kernel-E:
 
in XML:
 
in Java:
 

The normal E left to right scoping and execution rules apply. Each pattern may use variables defined by patterns to its left, and all variables defined by any of these patterns are variables defined by the tuple pattern as a whole.
 
Unless stated otherwise, all text on this page which is either unattributed or by Mark S. Miller is hereby placed in the public domain.
ERights Home elang / kernel 
Back to: Such-That Pattern On to: Tuple Pattern
Download    FAQ    API    Mail Archive    Donate

report bug (including invalid html)

Golden Key Campaign Blue Ribbon Campaign