diff options
Diffstat (limited to 'samples/aoc/2023/01')
-rw-r--r-- | samples/aoc/2023/01/input | 4 | ||||
-rw-r--r-- | samples/aoc/2023/01/solve.bruijn | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/samples/aoc/2023/01/input b/samples/aoc/2023/01/input new file mode 100644 index 0000000..7bbc69a --- /dev/null +++ b/samples/aoc/2023/01/input @@ -0,0 +1,4 @@ +1abc2 +pqr3stu8vwx +a1b2c3d4e5f +treb7uchet diff --git a/samples/aoc/2023/01/solve.bruijn b/samples/aoc/2023/01/solve.bruijn new file mode 100644 index 0000000..5fdfa88 --- /dev/null +++ b/samples/aoc/2023/01/solve.bruijn @@ -0,0 +1,7 @@ +:import std/Math . +:import std/String . +:import std/Char C + +part1 [[^0 ⋅ (+10) + _0] (filter (gre? (+9)) (C.number! <$> 0))] + +main [∑(part1 <$> (lines 0))] |