mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 13:03:19 -09:00
golf
This commit is contained in:
parent
1bd800472d
commit
bd26741879
@ -22,8 +22,7 @@
|
|||||||
(if
|
(if
|
||||||
(some acc (orderings el)) (reduced false)
|
(some acc (orderings el)) (reduced false)
|
||||||
(conj acc el)))
|
(conj acc el)))
|
||||||
#{}
|
#{} coll))
|
||||||
coll))
|
|
||||||
|
|
||||||
(defn order [coll]
|
(defn order [coll]
|
||||||
(reduce (fn [acc p]
|
(reduce (fn [acc p]
|
||||||
@ -34,8 +33,7 @@
|
|||||||
not-empty)]
|
not-empty)]
|
||||||
(c/insert-vec acc (apply min idxs) p)
|
(c/insert-vec acc (apply min idxs) p)
|
||||||
(conj acc p)))
|
(conj acc p)))
|
||||||
[]
|
[] coll))
|
||||||
coll))
|
|
||||||
|
|
||||||
;; part 1
|
;; part 1
|
||||||
(->> pages
|
(->> pages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user