ything that hasn&rsquo;t been matched by preceding patterns.
</li>
<li>Line 55:
this loop scans though all patterns from top to bottom;
it stops at the first pattern that matches.
The &lsquo;sure match&rsquo; on line 52 ensures
the loop will never pass the end of the array.
</li>
<li>Line 56:
the function that belongs to the matching pattern is called.
</li>
</ul>
</div>
<p>
The hardest part is the implementation of function <i>matchCommand</i>.
But as you can see below, that too can be done in less than 10