diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2021-12-18 17:50:01 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2021-12-19 16:39:03 +0200 |
| commit | 247d7534c247f19be84c0984581279ef5545b1e6 (patch) | |
| tree | c336cac1d5bb8e585abeb672d7f0f0c22d320278 /utils.hs | |
| parent | 63c1f74fe9a20984f6a19c3c2344793b1ed10072 (diff) | |
Day 18
Diffstat (limited to 'utils.hs')
| -rw-r--r-- | utils.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |
