--- lam.util --- utility functions local m = {} local string = string m.luaerror = error -- signal an error -- WHERE is where in the process; DESC is a description of the error; the rest -- are "irritants" function m.error (desc, ...) local irritants = {} for _, i in ipairs({...}) do table.insert(irritants, tostring(i)) end m.luaerror(string.format("%s: %s", desc, table.concat(irritants, ", ") )) end -- remove an element from the front of TBL function m.pop (tbl) return table.remove(tbl, 1) end -------- return m