* Counts the values that have the second argument as a substring
* Returns key that, using some fuzzy string algorithm, matches the second argument the closest
* Computes a score from matching the second argument against the map, which tracks document occurrences in a search engine type gizmo
I don't think the meaning is obvious at all. If anything it's a lesson in naming stuff: Don't call your functions "boo".
invMap :: forall k v. (Eq v, Eq k) =>
Map k v -> v -> Set k
Intuitively, invMap can either be computing the Set of ks which hold a particular v or, maybe, the set of ks which don't hold that value and not much else.