aboutsummaryrefslogtreecommitdiff
path: root/utils.moon
diff options
context:
space:
mode:
Diffstat (limited to 'utils.moon')
-rw-r--r--utils.moon4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils.moon b/utils.moon
index 7ba39bb..1f6d0d7 100644
--- a/utils.moon
+++ b/utils.moon
@@ -64,6 +64,10 @@ utils = {
with tot = 0
for _,x in pairs(t) do tot += x
+ product: (t)->
+ with prod = 1
+ for _,x in pairs(t) do prod *= x
+
all: (t)->
for _,x in pairs t
if not x then return false