diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-21 21:11:13 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-21 21:11:13 -0700 |
| commit | 26d72ce56ed1e9066edfbb3fedd8f5570d0cb5f4 (patch) | |
| tree | 539761e2fc96f20579b106cec99bf0634dfe0708 /utils.moon | |
| parent | e478b33d7abba5933ddfcc60558585b58b898bff (diff) | |
Overhaul of invocations/specs. Much cleaner and more consistent now,
with less code duplication.
Diffstat (limited to 'utils.moon')
| -rw-r--r-- | utils.moon | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 = {} |
