Anonymous user
Averages/Root mean square: Difference between revisions
→{{header|Clojure}}: Removed dependency and use the built in function - works copy/paste in any vanilla clojure repl, whereas before, you needed to edit a project.clj file not documented
(→{{header|Haskell}}: Used Data.List.genericLength in lieu of (fromIntegral . length)) |
(→{{header|Clojure}}: Removed dependency and use the built in function - works copy/paste in any vanilla clojure repl, whereas before, you needed to edit a project.clj file not documented) |
||
Line 347:
=={{header|Clojure}}==
<lang clojure>
(defn rms [xs]
(Math/sqrt (/ (reduce + (map #(* % %) xs))
(count xs))))
|