Restructure to permit generalisation to metrics over sets other than real vectors.
Metrics for edit distance: Hammingr Levenshtein, restricted Damerau-Levenshtein.