aboutsummaryrefslogtreecommitdiff
path: root/lib/math.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-01-24 13:13:03 -0800
committerBruce Hill <bitbucket@bruce-hill.com>2018-01-24 13:13:26 -0800
commitf769351556cceed58ab6bf844c671114ec1862c2 (patch)
treedd7dcf811082cf4e4c4bb0b6b3cd3811cf4385e1 /lib/math.nom
parentd173e9ae88380bb1217b3f775e6c3cec71a6606c (diff)
Updated and improve syntax for some stuff. Also added string indexing
like in python, including slices.
Diffstat (limited to 'lib/math.nom')
-rw-r--r--lib/math.nom8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/math.nom b/lib/math.nom
index 2af59eb..0210293 100644
--- a/lib/math.nom
+++ b/lib/math.nom
@@ -37,18 +37,18 @@ action [%n to the nearest %rounder]
# Any/all/none
compile [all of %items, all %items] to
- "(\(join ((% as lua) for all (%items' "value")) with " and "))"
+ "(\(joined ((% as lua) for all (%items' "value")) with " and "))"
..if ((%items' "type") is "List") else "utils.all(\(%items as lua))"
parse [not all of %items, not all %items] as: not (all of %items)
compile [any of %items, any %items] to
- "(\(join ((% as lua) for all (%items' "value")) with " or "))"
+ "(\(joined ((% as lua) for all (%items' "value")) with " or "))"
..if ((%items' "type") is "List") else "utils.any(\(%items as lua))"
parse [none of %items, none %items] as: not (any of %items)
compile [sum of %items, sum %items] to
- "(\(join ((% as lua) for all (%items' "value")) with " + "))"
+ "(\(joined ((% as lua) for all (%items' "value")) with " + "))"
..if ((%items' "type") is "List") else "utils.sum(\(%items as lua))"
compile [product of %items, product %items] to
- "(\(join ((% as lua) for all (%items' "value")) with " * "))"
+ "(\(joined ((% as lua) for all (%items' "value")) with " * "))"
..if ((%items' "type") is "List") else "utils.product(\(%items as lua))"
action [avg of %items, average of %items]
=lua "(utils.sum(\%items)/#\%items)"