From 26d72ce56ed1e9066edfbb3fedd8f5570d0cb5f4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 21 Sep 2017 21:11:13 -0700 Subject: Overhaul of invocations/specs. Much cleaner and more consistent now, with less code duplication. --- utils.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'utils.lua') diff --git a/utils.lua b/utils.lua index ddd2c3c..e058645 100644 --- a/utils.lua +++ b/utils.lua @@ -78,6 +78,14 @@ utils = { end return _accum_0 end, + remove_from_list = function(list, item) + for i, list_item in ipairs(list) do + if list_item == item then + table.remove(list, i) + return + end + end + end, accumulate = function(glue, co) if co == nil then glue, co = "", glue -- cgit v1.2.3