1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

🔥 isOpenRowBy.

This commit is contained in:
Rob Rix 2016-03-09 01:05:38 -05:00
parent 43ab2d4523
commit 97870a8da1

View File

@ -11,9 +11,6 @@ newtype Row a = Row { unRow :: Both (Line a) }
makeRow :: Line a -> Line a -> Row a
makeRow a = Row . both a
isOpenRowBy :: Both (a -> Bool) -> Row a -> Bool
isOpenRowBy f = runBothWith (&&) . (isOpenLineBy <$> f <*>) . unRow
-- | Merge open lines and prepend closed lines (as determined by a pair of functions) onto a list of rows.
adjoinRowsBy :: Both (a -> Bool) -> Row a -> [Row a] -> [Row a]
adjoinRowsBy _ row [] = [ row ]