-- For functions in which the return value type depends on the input and a condition.

local function Nope() end

local function Return(...) return ... end

local function SelectiveReturn(inval,...)
	local args = {...}
	return args[inval]
end

local function Select(condition,yes,no)
	if condition then return yes else return no end
end

local function MatchReplace(inval,with,inval2)
	return Select(inval == inval2,with,inval)
end

local function SwitchVariables(inval,inval2)
	return inval2,inval
end

local function ValueUnpack(inval)
	if IsTableToBool(inval) then
		if TableLength(inval) < 2 then
			return TableUnpack(inval)
		end
	end
	return inval
end
