mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
Simplify the base case.
This commit is contained in:
parent
761e5abe93
commit
57b2d1f645
@ -30,6 +30,5 @@ coalesceLinesBy _ line nextLine = [line, nextLine]
|
||||
|
||||
-- | Merge open lines and prepend closed lines (as determined by a pair of functions) onto a list of rows.
|
||||
adjoinRowsBy :: Both (MaybeOpen a) -> Row a -> [Row a] -> [Row a]
|
||||
adjoinRowsBy _ row [] = [ row ]
|
||||
adjoinRowsBy f row (nextRow : rows) = zipWithDefaults makeRow (pure EmptyLine) (coalesceLinesBy <$> f <*> unRow row <*> unRow nextRow) ++ rows
|
||||
|
||||
adjoinRowsBy _ row rows = row : rows
|
||||
|
Loading…
Reference in New Issue
Block a user