Permalink
Browse files

Add sum_and_product_of_array

  • Loading branch information...
1 parent bcf3c3e commit d260e990c93f4e6e1acd9b697cf8bd3544201c65 @purcell committed Dec 28, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 sum_and_product_of_array.clj
@@ -0,0 +1,6 @@
+;; http://rosettacode.org/wiki/Sum_and_product_of_array#Clojure
+
+
+(defn sum [vals] (reduce + vals))
+
+(defn product [vals] (reduce * vals))

0 comments on commit d260e99

Please sign in to comment.