diff options
Diffstat (limited to 'day03')
| -rw-r--r-- | day03/main.hs | 3 |
1 files changed, 0 insertions, 3 deletions
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]) |
