use parallel

This commit is contained in:
2024-12-08 00:58:09 -05:00
parent 376d37c805
commit e9b4eabf3e
+6 -2
View File
@@ -19,7 +19,9 @@
;; part 1 ;; part 1
(->> input (->> input
(filter #(valid-row? (first %) 0 (second %))) (pmap #(when (valid-row? (first %) 0 (second %))
%))
(filter identity)
(map first) (map first)
(reduce +)) (reduce +))
@@ -34,7 +36,9 @@
;; part 2 ;; part 2
(->> input (->> input
(filter #(apply valid-row-2? %)) (pmap #(when (apply valid-row-2? %)
%))
(filter identity)
(map first) (map first)
(reduce +)) (reduce +))