mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
Add runJoinWith to extract-and-apply Join.
This commit is contained in:
parent
f2bd582dfb
commit
606b5b48c8
@ -149,6 +149,9 @@ modifyJoin f = Join . f . runJoin
|
||||
bimapJoin :: Bifunctor p => (a -> b) -> (a -> b) -> Join p a -> Join p b
|
||||
bimapJoin f g = modifyJoin $ bimap f g
|
||||
|
||||
runJoinWith :: (p a a -> b) -> Join p a -> b
|
||||
runJoinWith f = f . runJoin
|
||||
|
||||
intersects :: Range -> Range -> Bool
|
||||
intersects a b = max (start a) (start b) < min (end a) (end b)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user