СС
Size: a a a
СС
СС
T
(def darts-numbers '(20 1 18 4 13 6 10 15 2 17 3 19 7 16 8 11 14 9 12 5 20 1))
(->>
darts-numbers
(partition 3 1)
(map #(assoc {} (apply str (interpose "-" %)) (apply + %)))
(into {})
(apply max-key val))
(map (fn [x]
{(str/join "-" x)
(apply + x)}))
СС
СС
T
(def darts-numbers '(20 1 18 4 13 6 10 15 2 17 3 19 7 16 8 11 14 9 12 5 20 1))
(->>
darts-numbers
(partition 3 1)
(map #(assoc {} (apply str (interpose "-" %)) (apply + %)))
(into {})
(apply max-key val))
T
СС
java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.util.Map$Entry
СС
T
java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.util.Map$Entry
T
(->>
darts-numbers
(partition 3 1)
(map (fn [x]
[(str/join "-" x)
(apply + x)]))
(apply max-key second))
СС
T
T
(->>
darts-numbers
(partition 3 1)
(map (fn [x]
[(str/join "-" x)
(apply + x)]))
(apply max-key second))
СС
(->>
darts-numbers
(partition 3 1)
(map #([(clojure.string/join "-" %) (apply + %)]))
(apply max-key second))
Wrong number of args (0) passed to: clojure.lang.PersistentVector
T
(->>
darts-numbers
(partition 3 1)
(map #([(clojure.string/join "-" %) (apply + %)]))
(apply max-key second))
Wrong number of args (0) passed to: clojure.lang.PersistentVector
T
T
(->>
darts-numbers
(partition 3 1)
(map (fn [x]
[(str/join "-" x)
(apply + x)]))
(apply max-key second))
СС