diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-01-28 19:25:47 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-01-28 21:16:29 +0200 |
| commit | 58b2c2c4a8e6c5bc1782ac748ef207264418ac8d (patch) | |
| tree | 4a2343a2130fe67168b1df7194dd7aafaf9b6e39 /src/utils.hs | |
| parent | ad711dc91b1f916d27d3ce5cb286f991d3f4ec32 (diff) | |
Add conditionals, rework interpret order
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) |
