1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

🔥 lineAndRemainingWhere.

This commit is contained in:
Rob Rix 2016-05-27 11:00:05 -04:00
parent ac209ea61f
commit c03f32f9c8

View File

@ -161,7 +161,6 @@ alignBranch getRange children ranges = case intersectingChildren of
(leftRange, rightRange) = splitThese headRanges
lineAndRemaining children ranges = let (intersections, remaining) = alignChildren getRange children ranges in
((,) <$> ranges `applyToBoth` intersections, remaining)
lineAndRemainingWhere predicate children = if any predicate children then Just . lineAndRemaining (filter predicate children) else const Nothing
advancePast :: [Join These term] -> ([a] -> [a], [a] -> [a])
advancePast children = fromThese identity identity . runJoin . (drop 1 <$) $ unionThese children