Rules for Pattern Matching

The preceding example illustrates some rules for pattern matching:

  1. Structure and constant parts of the pattern must match the input exactly.

  2. Variables must match consistently. A variable in the pattern can match anything in the input the first time, but it must match the same thing thereafter.

Contents    Page-10    Prev    Next    Page+10    Index