module Aoc where aocMain :: Show p => ([String] -> p) -> (p -> Int) -> (p -> Int) -> IO () aocMain parseFile part1 part2 = do contents <- readFile "input.txt" let input = parseFile $ lines contents -- print $ "Input: " ++ show input print $ "Part 1: " ++ show (part1 input) print $ "Part 2: " ++ show (part2 input) enumerate :: [a] -> [(Int, a)] enumerate xs = zip [0..length xs] xs