diff options
author | Akshay <[email protected]> | 2020-12-05 07:49:25 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2020-12-05 07:49:25 +0000 |
commit | 555da2ae6f658672cfc0d37e437ec356c0c0fa63 (patch) | |
tree | f1b1b2e411ac130373421aece0cb8e5709a0e925 /execs/Day02.hs | |
parent | e0a5d9cbf99c2d6bbaef12f2ce5506eda0ba5bec (diff) |
factor common functions into Utils
Diffstat (limited to 'execs/Day02.hs')
-rw-r--r-- | execs/Day02.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/execs/Day02.hs b/execs/Day02.hs index a2815b7..c462ec9 100644 --- a/execs/Day02.hs +++ b/execs/Day02.hs | |||
@@ -2,12 +2,7 @@ module Main where | |||
2 | 2 | ||
3 | import Text.ParserCombinators.Parsec | 3 | import Text.ParserCombinators.Parsec |
4 | import Text.Parsec.Char | 4 | import Text.Parsec.Char |
5 | 5 | import Utils | |
6 | countElem c ls = sum $ map (fromEnum . (== c)) ls | ||
7 | |||
8 | xor a b = (not a && b) || (a && not b) | ||
9 | |||
10 | right (Right a) = a | ||
11 | 6 | ||
12 | data PassProp = PassProp | 7 | data PassProp = PassProp |
13 | { range :: (Int, Int) | 8 | { range :: (Int, Int) |