1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 04:11:48 +03:00

Infix fmap.

This commit is contained in:
Rob Rix 2016-06-06 15:36:51 -04:00
parent ef57f3aece
commit 19fc31747e

View File

@ -25,7 +25,7 @@ diffAt diffTerms cost (i, j) as bs
Nothing -> do Nothing -> do
down <- recur (i, succ j) as (b : bs) down <- recur (i, succ j) as (b : bs)
right <- recur (succ i, j) (a : as) bs right <- recur (succ i, j) (a : as) bs
nomination <- fmap best $ case diffTerms a b of nomination <- best <$> case diffTerms a b of
Just diff -> do Just diff -> do
diagonal <- recur (succ i, succ j) as bs diagonal <- recur (succ i, succ j) as bs
pure [ delete a down, insert b right, consWithCost cost diff diagonal ] pure [ delete a down, insert b right, consWithCost cost diff diagonal ]