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.moon | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'utils.moon') 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 = {} -- cgit v1.2.3