--[[
	Runs a non-promise-returning function as a Promise with the
  given arguments.
]]

function Promise._try(traceback, callback, ...)
	local valuesLength, values = pack(...)

	return Promise._new(traceback, function(resolve)
		resolve(callback(unpack(values, 1, valuesLength)))
	end)
end
