Artificial intelligent assistant

Clojureのsortシンボルに関して CodeEvalSimpleSorting < Float (-10.000, -1.000, -2.000) -> (-1.000, -2.000, -10.000) (ns simple-sorting.core (:use [clojure.string :only [split join]]) (:gen-class)) (defn splt-num [s] (split s #" ")) (defn str->num [coll] (map read-string coll)) (defn num->float3 [coll] (vec (map #(format "%.3f" %1) coll))) (with-open [rdr (clojure.java.io/reader (first *command-line-args*))] (doseq [line (remove empty? (line-seq rdr))] (def nums (splt-num line)) (def nss (str->num nums)) (def f3 (num->float3 nss)) (println (join " " (sort f3)))))

`num->float3``["-10.000" "-1.000" "-2.000"]` -> `["-1.000" "-10.000" "-2.000"]`



(with-open [rdr (clojure.java.io/reader (first *command-line-args*))]
(doseq [line (remove empty? (line-seq rdr))]
(let [nums (-> line splt-num str->num sort)]
(println (join " " nums)))))


Clojure`def`letlet

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a6b55bde43a3a4ec8aacfdfc33b4c959