--[[
	Converts a yielding function into a Promise-returning one.
]]

function Promise.promisify(callback)
	return function(...)
		return Promise._try(debug.traceback(nil, 2), callback, ...)
	end
end
Promise.Promisify = Promise.promisify
