aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-10-11 20:32:31 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-10-11 20:32:31 -0700
commit4e5445e6bcd2007a6308942237523eef7c94953f (patch)
treebaf4c8e43e4d73bbc731eac20ea3a2553d893069 /lib
parentd0b0cfcf397fea5d71e986d5e1a2e3b7aab5fcfe (diff)
Added table.remove to collections.
Diffstat (limited to 'lib')
-rw-r--r--lib/collections.nom7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/collections.nom b/lib/collections.nom
index 4d459b7..91b7941 100644
--- a/lib/collections.nom
+++ b/lib/collections.nom
@@ -73,6 +73,13 @@ compile [..]
compile [append %item to %list, add %item to %list] to:
"table.insert(\(%list as lua), \(%item as lua))"
+compile [pop from %list, remove last from %list] to:
+ "table.remove(\(%list as lua))"
+
+compile [remove index %index from %list] to:
+ "table.remove(\(%list as lua), \(%index as lua))"
+
+
rule [flatten %lists] =:
%flat = []
for %list in %lists: