The idea is that it repeatedly matches a pair and removes it while it can. When it is done, it then checks if any were left over.
In reply to Re (tilly) 2: Determining if you have balanced delimiters
by tilly
in thread Determining if you have balanced delimiters
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |