diff options
Diffstat (limited to 'src/utils.hs')
| -rw-r--r-- | src/utils.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils.hs b/src/utils.hs index 9ba2fa0..e3c0150 100644 --- a/src/utils.hs +++ b/src/utils.hs @@ -1,4 +1,5 @@ module Utils where +import qualified Data.Bifunctor as B (.>) = flip (.) @@ -28,3 +29,6 @@ isIntStr str = in case ir of Just _ -> True Nothing -> False + +breakOn :: (a -> Bool) -> [a] -> ([a], [a]) +breakOn cond xs = break cond xs $> B.second (drop 1) |
