mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
🔥 getK.
This commit is contained in:
parent
7f932559cf
commit
d582bcb435
@ -90,12 +90,6 @@ middleSnake as bs = M (MiddleSnake as bs) `Then` return
|
||||
|
||||
data MyersState = MyersState { forward :: !(Vector.Vector Int), backward :: !(Vector.Vector Int), offset :: Diagonal }
|
||||
|
||||
getK :: Direction -> Diagonal -> Myers Endpoint
|
||||
getK direction (Diagonal diagonal) = do
|
||||
MyersState forward backward (Diagonal offset) <- get
|
||||
let v = case direction of { Forward -> forward ; Reverse -> backward }
|
||||
return $! v `at` (offset + diagonal)
|
||||
|
||||
at :: Vector.Vector Int -> Int -> Endpoint
|
||||
at v k = Endpoint (v Vector.! k) 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user