Logo fantomas

Suggestion Module

Functions and values

Function or value Description

editDistance limit left right

Full Usage: editDistance limit left right

Parameters:
Returns: int

How many single character edits turn one string into the other, stopping once the answer is known to be above `limit`.

limit : int
left : string
right : string
Returns: int

nearest limit candidates term

Full Usage: nearest limit candidates term

Parameters:
Returns: string option

The candidate closest to `term`, when one is within `limit` edits of it, and `None` when the nearest is far enough away that naming it would be a guess rather than help. Two candidates the same distance away are separated by the order of `candidates`, since `List.sortBy` is stable.

limit : int
candidates : string list
term : string
Returns: string option

Type something to start searching.