sln_2023_01
Copyright(c) Eric Mertens 2023
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2023/day/1

For each line in the input, create a two digit number from the first and last digits on the line, then sum up all of these numbers.

>>> decode part1 <$> ["1abc2","pqr3stu8vwx","a1b2c3d4e5f","treb7uchet"]
[12,38,15,77]
>>> decode part2 <$> ["two1nine","eightwothree","abcone2threexyz","xtwone3four","4nineeightseven2","zoneight234","7pqrstsixteen"]
[29,83,13,24,42,14,76]
Synopsis

Documentation

main :: IO () Source #

Parse the input and print answers to both parts.

>>> :main
55123
55260