CDE
This commit is contained in:
parent
518da4a923
commit
764da6cbbb
6144 changed files with 83610 additions and 11 deletions
6
Task/Dot-product/Clojure/dot-product.clj
Normal file
6
Task/Dot-product/Clojure/dot-product.clj
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(defn dot-product [& matrix]
|
||||
{:pre [(apply == (map count matrix))]}
|
||||
(apply + (apply map * matrix)))
|
||||
|
||||
;Example Usage
|
||||
(println (dot-product [1 3 -5] [4 -2 -1]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue