mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Document spanThese.
This commit is contained in:
parent
dcd9431987
commit
65157c54f2
@ -153,6 +153,10 @@ group2 ranges children | Just (headRanges, tailRanges) <- unconsThese ranges
|
||||
| ([]:rest) <- children = group2 ranges rest
|
||||
| otherwise = ([] <$ ranges, children, fmap (flip (,) []) <$> sequenceL ranges)
|
||||
|
||||
-- | Partitions and splits a list of children into a triple consisting of:
|
||||
-- | - elements which matched; if an element matches only partially this field will contain only the matching side
|
||||
-- | - the opposite sides of elements which matched only on the other side
|
||||
-- | - elements which do not intersect.
|
||||
spanThese :: (Join These a -> Join These Bool) -> [[Join These a]] -> ([[Join These a]], [[Join These a]], [[Join These a]])
|
||||
spanThese pred children | (child:rest) <- children
|
||||
, not (null child)
|
||||
|
Loading…
Reference in New Issue
Block a user