mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Use the fmap operator.
This commit is contained in:
parent
226ba36c60
commit
76863d9e52
@ -221,7 +221,7 @@ nearestUnmapped' :: (Foldable syntax, Functor syntax, GAlign syntax)
|
||||
-> UnmappedTerm syntax ann2 -- ^ The term to find the nearest neighbour to.
|
||||
-> Maybe (UnmappedTerm syntax ann1) -- ^ The most similar unmapped term, if any.
|
||||
nearestUnmapped' isEligible tree key = listToMaybe (sortOn approximateEditDistance candidates)
|
||||
where candidates = filter isEligible (fmap snd (kNearest tree defaultL (feature key)))
|
||||
where candidates = filter isEligible (snd <$> kNearest tree defaultL (feature key))
|
||||
approximateEditDistance = editDistanceUpTo defaultM (term key) . term
|
||||
|
||||
defaultD, defaultL, defaultP, defaultQ, defaultMoveBound :: Int
|
||||
|
Loading…
Reference in New Issue
Block a user