What is the difference between
I have written a program that gives me the greatest value within the parameters reported. Obs: I know that the function exists
max-keybut I do not want to use them because I want to train the language.
(defn Maximum value [& num] (and a lot [x (atom (first num))] (doseq [i num] (when (> i @x) (reset! x i))) @x))
is, it does not work.
(defnMaximum2 [& num] (and a lot [x (atom (first num))] (by [i num :when (> i @x)] (reset! x i)) @x))