local F="\078\111\110-\112\114\111\109\105\115\101 \118\097\108\117\101 \112\097\115\115\101\100 \105\110\116\111 \037\115 \097\116 \105\110\100\101\120 \037\115"local c="\080\108\101\097\115\101 \112\097\115\115 \097 \108\105\115\116 \111\102 \112\114\111\109\105\115\101\115 \116\111 \037\115"local b="\080\108\101\097\115\101 \112\097\115\115 \097 \104\097\110\100\108\101\114 \102\117\110\099\116\105\111\110 \116\111 \037\115\033"local D={__mode="\107"}local function W(F)if type(F)=="\102\117\110\099\116\105\111\110"then return true end if type(F)=="\116\097\098\108\101"then local c=getmetatable(F)if c and type(rawget(c,"\095\095\099\097\108\108"))=="\102\117\110\099\116\105\111\110"then return true end end return false end
--[[
	An implementation of Promises similar to Promise/A+.
]]

local ERROR_NON_PROMISE_IN_LIST = "Non-promise value passed into %s at index %s"
local ERROR_NON_LIST = "Please pass a list of promises to %s"
local ERROR_NON_FUNCTION = "Please pass a handler function to %s!"
local MODE_KEY_METATABLE = { __mode = "k" }

local function isCallable(value)
	if type(value) == "function" then
		return true
	end

	if type(value) == "table" then
		local metatable = getmetatable(value)
		if metatable and type(rawget(metatable, "__call")) == "function" then
			return true
		end
	end

	return false
end
