From 3142bbcc613f880a9356ac1c837e2902f12a168e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 7 Dec 2021 12:43:51 +0200 Subject: Day 04 --- day03/main.hs | 3 --- 1 file changed, 3 deletions(-) (limited to 'day03/main.hs') diff --git a/day03/main.hs b/day03/main.hs index 3488d69..6b0b10b 100644 --- a/day03/main.hs +++ b/day03/main.hs @@ -14,9 +14,6 @@ convert (x : xs) = x + 2 * convert xs toIntMatrix :: [[Char]] -> [[Int]] toIntMatrix = map (map digitToInt) -transpose :: [[a]] -> [[a]] -transpose = getZipList . traverse ZipList - mostCommon :: [Int] -> Int -- Appending [0, 1] is a hack to make maximumBy choose 1 in a tie due to semantics mostCommon lst = maximumBy (comparing (\x -> length $ filter (x ==) lst)) (lst ++ [0, 1]) -- cgit v1.3