From 5446705237a6fc1842f02b0a8b3bc2b74aab4557 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 24 Feb 2023 16:54:17 +0100 Subject: Added code samples --- samples/aoc/2022/01/input | 14 ++++++++++++++ samples/aoc/2022/01/solve.bruijn | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 samples/aoc/2022/01/input create mode 100644 samples/aoc/2022/01/solve.bruijn (limited to 'samples/aoc/2022') diff --git a/samples/aoc/2022/01/input b/samples/aoc/2022/01/input new file mode 100644 index 0000000..2094f91 --- /dev/null +++ b/samples/aoc/2022/01/input @@ -0,0 +1,14 @@ +1000 +2000 +3000 + +4000 + +5000 +6000 + +7000 +8000 +9000 + +10000 diff --git a/samples/aoc/2022/01/solve.bruijn b/samples/aoc/2022/01/solve.bruijn new file mode 100644 index 0000000..7764db8 --- /dev/null +++ b/samples/aoc/2022/01/solve.bruijn @@ -0,0 +1,7 @@ +:import std/Math . +:import std/String . + +main [lmax sums] + numbers number! <$> (lines 0) + parts split-at =?‣ numbers + sums sum <$> parts -- cgit v1.2.3