aboutsummaryrefslogtreecommitdiff
path: root/utils.moon
diff options
context:
space:
mode:
Diffstat (limited to 'utils.moon')
-rw-r--r--utils.moon6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils.moon b/utils.moon
index 3b3573c..f267c7d 100644
--- a/utils.moon
+++ b/utils.moon
@@ -41,6 +41,12 @@ utils = {
split: (str, sep="%s")->
[chunk for chunk in str\gmatch("[^#{sep}]+")]
+ remove_from_list: (list, item)->
+ for i,list_item in ipairs(list)
+ if list_item == item
+ table.remove list, i
+ return
+
accumulate: (glue, co)->
if co == nil then glue, co = "", glue
bits = {}