fixed doctests
Made inexact matching much more efficient.

Instead of enumerating all possible mutations, instead prune partial
matches on the fly.