Improve typespec for internal levenshtein_rec