diff options
Diffstat (limited to 'samples/aoc/2023')
-rw-r--r-- | samples/aoc/2023/01/input | 2 | ||||
-rw-r--r-- | samples/aoc/2023/01/solve.bruijn | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/samples/aoc/2023/01/input b/samples/aoc/2023/01/input index 7bbc69a..1ba8437 100644 --- a/samples/aoc/2023/01/input +++ b/samples/aoc/2023/01/input @@ -1,4 +1,4 @@ 1abc2 pqr3stu8vwx a1b2c3d4e5f -treb7uchet +treb7uchet
\ No newline at end of file diff --git a/samples/aoc/2023/01/solve.bruijn b/samples/aoc/2023/01/solve.bruijn index 74361a2..2ed5c5f 100644 --- a/samples/aoc/2023/01/solve.bruijn +++ b/samples/aoc/2023/01/solve.bruijn @@ -1,7 +1,8 @@ -:import std/Math . +:import std/Combinator . :import std/String . -:import std/Char C +:import std/Math . +:import std/Char . -part1 [[^0 ⋅ (+10) + _0] (filter (gre? (+9)) (C.char→number <$> 0))] +part1 (filter numeric?) → [^0 : {}(_0)] → string→number main [∑(part1 <$> (lines 0))] |