Re:Clojure and the technology adoption curve
by dmichulke on Wednesday November 11, 2015 @04:31AM
(#10545643)
(def mymap {"asd" 1 "qwe" 2 "rtz" 3 "foo" 4 "bar" 5 "quz" 6 "bnm" 7})
(let [ints (->> (filter (comp odd? count key) mymap)
(sort-by (comp int last first))
(map (fn [[s i]]
(+ (count s) i))))]
(reduce + 0 (map * ints (reverse ints))))
Gives me 341
I'm trying to implement it in Kotlin and am curious how it would compare.