Skip to content

Commit 80b7637

Browse files
committed
Add pocketwatch
1 parent 179717a commit 80b7637

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/aoc_2024/day_19.gleam

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import gleam/bool
22
import gleam/int
3-
import gleam/io
43
import gleam/list
54
import gleam/string
5+
import pocket_watch
66
import rememo/memo
77

88
pub type Input {
99
Input(towels: List(String), patterns: List(String))
1010
}
1111

1212
pub fn parse(input: String) -> Input {
13+
use <- pocket_watch.simple("parse")
1314
case string.split(input, "\n\n") {
1415
[towels_str, patterns_str] -> {
1516
Input(
@@ -22,6 +23,7 @@ pub fn parse(input: String) -> Input {
2223
}
2324

2425
pub fn pt_1(input: Input) {
26+
use <- pocket_watch.simple("part 1")
2527
input.patterns
2628
|> list.count(pt_1_possible(input.towels, _))
2729
}
@@ -51,6 +53,7 @@ fn pt_1_possible_aux(towels: List(String), todos: List(String)) -> Bool {
5153
}
5254

5355
pub fn pt_2(input: Input) {
56+
use <- pocket_watch.simple("part 2")
5457
use cache <- memo.create()
5558
input.patterns
5659
|> list.map(pt_2_all(input.towels, _, cache))

0 commit comments

Comments
 (0)