mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 09:23:17 -09:00
use parallel
This commit is contained in:
parent
376d37c805
commit
e9b4eabf3e
@ -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 +))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user