FANDOM


return setmetatable({
	check = function(v)
		if v and v ~= true then
			if type(v) == 'table' then
				return getmetatable(v) and getmetatable(v).__tostring and
					tostring(v)
					or table.concat(v)
			end
			return v--i.e. numbers or strings
		end
	end,
	__index = {
		_ = function(self, v)
			local valid = getmetatable(self).check(v)
			if valid then
				table.insert(self, valid)
			end
			return self
		end,
		_in = function(self, v)
			return setmetatable({
				parent = self,
				getmetatable(self).check(v)
			}, getmetatable(self))
		end,
		_out = function(child, v2, outs)
			local parent = child.parent:_(child(v2))
			if outs and outs > 0 then repeat
				child = parent
				parent = parent.parent
				outs = parent and parent:_(child()) and (outs - 1) or 0
			until outs == 0 end
			return parent or child
		end
	},
	__call = function(t, i)
		return table.concat(t, i)
	end
},
{__call = function(self, v)
	return setmetatable({self.check(v)}, self)
end
})

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.