mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Erase the feature vector from equal terms.
This commit is contained in:
parent
3a0c0c29a6
commit
04cc05c20f
@ -149,7 +149,7 @@ rws compare as bs
|
||||
-- Possibly replace terms in a diff.
|
||||
replaceIfEqual :: Term f (Record fields) -> Term f (Record fields) -> Maybe (Diff f (Record fields))
|
||||
replaceIfEqual a b
|
||||
| (category <$> a) == (category <$> b) = hylo wrap runCofree <$> zipTerms a b
|
||||
| (category <$> a) == (category <$> b) = hylo wrap runCofree <$> zipTerms (eraseFeatureVector a) (eraseFeatureVector b)
|
||||
| otherwise = Nothing
|
||||
|
||||
cost = iter (const 0) . (1 <$)
|
||||
|
Loading…
Reference in New Issue
Block a user