Skip to content

Commit 861b8ff

Browse files
committed
fix link
1 parent b576834 commit 861b8ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/2024/puzzles/day17.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ object Day17:
4848
```
4949

5050
Now, let’s implement the `step` method. This is also a relatively straightforward translation from the puzzle description:
51-
* The only case in which the machine halts is if the instruction pointer goes out of bounds, so we start with `program.lift(ip)` (opcode) and `program.lift(ip + 1)` (operand) to wrap the rest of the logic (see my [Day 15 write-up](/scala-advent-of-code/2024/puzzles/day15) if you want a little explanation about `lift`).
51+
* The only case in which the machine halts is if the instruction pointer goes out of bounds, so we start with `program.lift(ip)` (opcode) and `program.lift(ip + 1)` (operand) to wrap the rest of the logic (see my [Day 15 write-up](day15) if you want a little explanation about `lift`).
5252
* We pattern match on the opcode to implement the instructions, observing that for most instructions, the program doesn’t produce any output, and increments `ip` by 2. Also, `combo` is an obvious helper method to write.
5353
* The `adv`, `bdv`, and `cdv` instructions are specified in a kind of roundabout way in the puzzle: they’re just computing a right shift! It took me embarassingly long to realize this.
5454

0 commit comments

Comments
 (0)