Returns the levenshtein distance between s1 and s2 - a cost of 1 per character insertion, deletion or update. Runs in quadratic time and linear memory.
(edit-distance "same" "same")
=> 0
(edit-distance "same" "sand")
=> 2
(edit-distance "Saturday" "Sunday")
=> 3
Returns a list of strings in str-ls
with the smallest
edit distance to str
, preserving order. If
max-distance
is provided and positive, only return if
the edits are less or equal to that distance.