Distance between two strings; must be a metric for correct pruning.
typedef StringDistance = int Function(String a, String b);