aboutsummaryrefslogtreecommitdiff
path: root/execs/Day02.hs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-12-05 07:49:25 +0000
committerAkshay <[email protected]>2020-12-05 07:49:25 +0000
commit555da2ae6f658672cfc0d37e437ec356c0c0fa63 (patch)
treef1b1b2e411ac130373421aece0cb8e5709a0e925 /execs/Day02.hs
parente0a5d9cbf99c2d6bbaef12f2ce5506eda0ba5bec (diff)
factor common functions into Utils
Diffstat (limited to 'execs/Day02.hs')
-rw-r--r--execs/Day02.hs7
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
3import Text.ParserCombinators.Parsec 3import Text.ParserCombinators.Parsec
4import Text.Parsec.Char 4import Text.Parsec.Char
5 5import Utils
6countElem c ls = sum $ map (fromEnum . (== c)) ls
7
8xor a b = (not a && b) || (a && not b)
9
10right (Right a) = a
11 6
12data PassProp = PassProp 7data PassProp = PassProp
13 { range :: (Int, Int) 8 { range :: (Int, Int)