package dolmen_type

  1. Overview
  2. Docs

Fuzzy search maps

type 'a t

The type of Fuzzy maps from Dolmen identifiers to values of type 'a

val empty : _ t

The empty fuzzy search map.

val mem : 'a t -> Dolmen.Std.Id.t -> bool

Test whether the given id is bound in the map.

val find : 'a t -> Dolmen.Std.Id.t -> 'a

Find the value bound to an id.

  • raises Not_found

    if the id is not bound.

val add : 'a t -> Dolmen.Std.Id.t -> 'a -> 'a t

Add a new binding to the map.

val suggest : 'a t -> limit:int -> Dolmen.Std.Id.t -> Dolmen.Std.Id.t list

Return a list of bound identifiers in the map that are close (up to limit in terms of edition distance) to the given id.

OCaml

Innovation. Community. Security.