function Signal.Connect(i,w)local Y=Connection.new(i,w)if i._handlerListHead then Y._next=i._handlerListHead i._handlerListHead=Y else i._handlerListHead=Y end return Y end function Signal.GetConnections(w)local i={}local Y=w._handlerListHead while Y do table.insert(i,Y)Y=Y._next end return i end

function Signal:Connect(fn)
	local connection = Connection.new(self, fn)
	if self._handlerListHead then
		connection._next = self._handlerListHead
		self._handlerListHead = connection
	else
		self._handlerListHead = connection
	end
	return connection
end


function Signal:GetConnections()
	local items = {}
	local item = self._handlerListHead
	while item do
		table.insert(items, item)
		item = item._next
	end
	return items
end

