mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
🔥 isClosedRowBy.
This commit is contained in:
parent
3cb0cd4ac4
commit
1f6f319842
@ -21,9 +21,6 @@ unRight = snd . unRow
|
||||
isOpenRowBy :: Both (a -> Bool) -> Row a -> Bool
|
||||
isOpenRowBy f = runBothWith (&&) . (isOpenLineBy <$> f <*>) . unRow
|
||||
|
||||
isClosedRowBy :: Both (a -> Bool) -> Row a -> Bool
|
||||
isClosedRowBy f = not . runBothWith (||) . (isOpenLineBy <$> f <*>) . unRow
|
||||
|
||||
coalesceLinesBy :: (a -> Bool) -> Line a -> Line a -> [Line a]
|
||||
coalesceLinesBy f line nextLine | isOpenLineBy f line = [line <> nextLine]
|
||||
coalesceLinesBy _ line nextLine = [line, nextLine]
|
||||
|
Loading…
Reference in New Issue
Block a user