Skip to content

Commit 95e17dc

Browse files
committed
Day 18
1 parent ca5fdbd commit 95e17dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/day20.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ For what it's worth, in the sample problem, `(get alg 0)` is zero, so the border
5050
```clojure
5151
(defn border-seq [alg]
5252
(let [block-of {dark-pixel 0, light-pixel 511}]
53-
(iterate #(-> % block-of alg) 0)))
53+
(iterate (comp alg block-of) dark-pixel)))
5454
```
5555

5656
Now we can create a `migrate-image` function, which takes in the algorithm, the value of all border coordinates, and

src/advent_2021_clojure/day20.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
(defn border-seq [alg]
1818
(let [block-of {dark-pixel 0, light-pixel 511}]
19-
(iterate #(-> % block-of alg) 0)))
19+
(iterate (comp alg block-of) dark-pixel)))
2020

2121
(defn next-value-at [alg border image coords]
2222
(->> (point/surrounding true coords)

0 commit comments

Comments
 (0)