mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
📝 intersectsRange.
This commit is contained in:
parent
012425b11a
commit
92b4fcba1b
@ -47,6 +47,7 @@ maybeLastIndex :: Range -> Maybe Int
|
||||
maybeLastIndex (Range start end) | start == end = Nothing
|
||||
maybeLastIndex (Range _ end) = Just $ end - 1
|
||||
|
||||
-- | Test two ranges for intersection.
|
||||
intersectsRange :: Range -> Range -> Bool
|
||||
intersectsRange range1 range2 = end range2 <= end range1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user