--[[
	
	Returns true if a table/dictionary contains userdata (somewhat deep)
	
	Functions.HasUserdata(
		table, 					<-- |REQ|	Table/dictionary
	)
	
--]]




return function(tbl)
	--- Variables
	local found = false
	
	--- Scan local function
	local function Scan(v)
		--- Already found userdata
		if found then
			return
		end
		
		--- Iterate
		for key, value in pairs(v) do
			--- Already found userdata
			if found then
				return
			end
			
			--- Main check
			if type(value) == "userdata" or type(key) == "userdata" then
				--- Userdata located
				found = true
				return
				
			elseif type(value) == "table" then
				--- Re-iterate
				Scan(value)
			end
		end
	end
	
	--- Scan
	Scan(tbl)
	
	--
	return found
end
