breaks ties randomly

This commit is contained in:
Ryan Boldi 2022-05-05 13:57:59 -04:00
parent 49d1287335
commit 2b234a988b

View File

@ -4,11 +4,10 @@
(defn argmax
"returns the index of the maximum value in a list"
[coll]
;(prn {:func :argmax :coll coll})
(->> coll
(map-indexed vector)
(apply max-key second)
first))
rand-nth))
(defn mean
"Returns the mean of a collection."