diff --git a/src/Data/RandomWalkSimilarity.hs b/src/Data/RandomWalkSimilarity.hs index 0102b9b3f..44faa2d86 100644 --- a/src/Data/RandomWalkSimilarity.hs +++ b/src/Data/RandomWalkSimilarity.hs @@ -45,12 +45,12 @@ rws compare as bs (previous, unmappedA, unmappedB) <- get fromMaybe (insertion previous unmappedA unmappedB kv) $ do foundA@(UnmappedTerm i _ a) <- nearestUnmapped unmappedA kdas kv - let UnmappedTerm j' _ _ = KdTree.nearest kdbs foundA + foundB@(UnmappedTerm j' _ _) <- nearestUnmapped unmappedB kdbs foundA guard (j == j') guard (i >= previous) compared <- compare a b pure $! do - put (i, List.delete foundA unmappedA, List.delete kv unmappedB) + put (i, List.delete foundA unmappedA, List.delete foundB unmappedB) pure (i, compared) nearestUnmapped unmapped tree key = let UnmappedTerm i _ _ = KdTree.nearest tree key in find ((== i) . termIndex) unmapped