aboutsummaryrefslogtreecommitdiffstats
path: root/utils.hs
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2021-12-18 17:50:01 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2021-12-19 16:39:03 +0200
commit247d7534c247f19be84c0984581279ef5545b1e6 (patch)
treec336cac1d5bb8e585abeb672d7f0f0c22d320278 /utils.hs
parent63c1f74fe9a20984f6a19c3c2344793b1ed10072 (diff)
Day 18
Diffstat (limited to 'utils.hs')
-rw-r--r--utils.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils.hs b/utils.hs
index 3e6c2b6..fb1ea96 100644
--- a/utils.hs
+++ b/utils.hs
@@ -44,3 +44,6 @@ count pred xs = xs $> filter pred .> length
takeUntil :: (a -> Bool) -> [a] -> [a]
takeUntil _ [] = []
takeUntil p (x : xs) = x : if p x then takeUntil p xs else []
+
+fromSymEither (Left x) = x
+fromSymEither (Right x) = x \ No newline at end of file