aboutsummaryrefslogtreecommitdiff
path: root/utils.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-12 17:42:35 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-12 17:42:35 -0700
commitc0efa6c7d12e3f9749f6e2dafe507799aa47fad6 (patch)
tree38638b0a117bcee6b2841a74d4351e3fe55d6fcc /utils.moon
parent6e236fa0957ef0c0d138b372fee736a6ea3302dd (diff)
Tweaks and fixes.
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