1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Add delete & insert bindings.

This commit is contained in:
Rob Rix 2015-11-30 17:25:43 -05:00
parent 37f6c02432
commit bf333bc073

View File

@ -36,6 +36,8 @@ diffAt diffTerms cost (i, j) (a : as) (b : bs) = do
put $ Map.insert (i, j) [] cachedDiffs
return []
where
delete = (id &&& cost) (Pure . Delete $ a)
insert = (id &&& cost) (Pure . Insert $ b)
sumCost script = sum $ snd <$> script
best options = minimumBy (comparing sumCost) options
recur = diffAt diffTerms cost