aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/aoc/2023
diff options
context:
space:
mode:
authorMarvin Borner2024-03-21 13:23:41 +0100
committerMarvin Borner2024-03-21 13:34:34 +0100
commit2065029025c6e53eb550717755996d1d6fc5f60d (patch)
treeb2ed64b9cb890925a57edc0577ef6faab7519b61 /samples/aoc/2023
parent93b53a5354620d94b128008d0b17670cc87c92f5 (diff)
Fixed AOC samples
Diffstat (limited to 'samples/aoc/2023')
-rw-r--r--samples/aoc/2023/01/input2
-rw-r--r--samples/aoc/2023/01/solve.bruijn7
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))]