mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
🔥 sublist.
This commit is contained in:
parent
64384f407b
commit
471449985a
@ -23,10 +23,6 @@ rangeLength range = end range - start range
|
||||
substring :: Range -> T.Text -> T.Text
|
||||
substring range = T.take (rangeLength range) . T.drop (start range)
|
||||
|
||||
-- | Return the portion of the list identified by the given range.
|
||||
sublist :: Range -> [a] -> [a]
|
||||
sublist range = take (rangeLength range) . drop (start range)
|
||||
|
||||
-- | Return a range that covers the entire text.
|
||||
totalRange :: Foldable f => f a -> Range
|
||||
totalRange t = Range 0 $ length t
|
||||
|
Loading…
Reference in New Issue
Block a user