use parallel

This commit is contained in:
Adam Jeniski 2024-12-08 00:58:09 -05:00
parent 376d37c805
commit e9b4eabf3e

View File

@ -19,7 +19,9 @@
;; part 1
(->> input
(filter #(valid-row? (first %) 0 (second %)))
(pmap #(when (valid-row? (first %) 0 (second %))
%))
(filter identity)
(map first)
(reduce +))
@ -34,7 +36,9 @@
;; part 2
(->> input
(filter #(apply valid-row-2? %))
(pmap #(when (apply valid-row-2? %)
%))
(filter identity)
(map first)
(reduce +))