Created
November 5, 2019 08:33
-
-
Save voidlizard/efbda838c4b44a605b578cce8937b1c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cutSectionSmart :: (Text -> Bool) -> (Text -> Bool) -> [Text] -> [Text] | |
cutSectionSmart a b txt = cutI | |
where | |
cutC = List.dropWhile (not . a) txt | |
cutI = List.takeWhile (not . b) cutC | |
cutSection :: Text -> Text -> [Text] -> [Text] | |
cutSection a b txt = cutI | |
where | |
cutC = List.dropWhile (\s -> not (normEq s a)) txt | |
cutI = List.takeWhile (\s -> not (normEq s b)) cutC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment