mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
Perform the adjoining through Both.
This commit is contained in:
parent
e606700b57
commit
e23da3feb9
@ -22,7 +22,7 @@ adjoinRowsBy :: MaybeOpen a -> MaybeOpen a -> [Row a] -> Row a -> [Row a]
|
||||
adjoinRowsBy _ _ [] row = [row]
|
||||
|
||||
adjoinRowsBy f g rows (Row left' right') | Just _ <- openLineBy f $ unLeft <$> rows, Just _ <- openLineBy g $ unRight <$> rows = zipWith Row (lefts left') (rights right')
|
||||
where (lefts, rights) = adjoinLinesBy f *** adjoinLinesBy g $ unzip $ runBoth . unRow <$> rows
|
||||
where (lefts, rights) = runBoth $ adjoinLinesBy <$> Both (f, g) <*> Both (unzip $ runBoth . unRow <$> rows)
|
||||
|
||||
adjoinRowsBy f _ rows (Row left' right') | Just _ <- openLineBy f $ unLeft <$> rows = case right' of
|
||||
EmptyLine -> rest
|
||||
|
Loading…
Reference in New Issue
Block a user