diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2021-12-18 18:07:21 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2021-12-18 18:07:21 -0500 |
commit | 9ef614f9bc70e87e7abb82a7baa1a7b77337bbac (patch) | |
tree | f479b8328344a2ce1a1ae876941788f0cb41af5f /day18 | |
parent | 0755910e65ae32b70b0c40ff76e1106aceeeb1e0 (diff) |
day18: simplify part 2 'for'
Diffstat (limited to 'day18')
-rw-r--r-- | day18/partboth.clj | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/day18/partboth.clj b/day18/partboth.clj index b3b97ca..83fc42c 100644 --- a/day18/partboth.clj +++ b/day18/partboth.clj @@ -87,10 +87,8 @@ (println (snailfish-solve input)) ; Part 2 -(->> (let [input-set (set input)] - (for [in input in2 (set/difference input-set (set [in]))] - [in in2])) - (into []) +(->> (for [in input in2 input :when (not= in in2)] [in in2]) + (vec) (r/map snailfish-solve) (r/fold (r/monoid max (constantly 0))) (println)) |