function Observable.Pipe(S,f)assert(type(f)=="\116\097\098\108\101","\066\097\100 \116\114\097\110\115\102\111\114\109\101\114\115")local m=S for f,S in pairs(f)do assert(type(S)=="\102\117\110\099\116\105\111\110","\066\097\100 \116\114\097\110\115\102\111\114\109\101\114")m=S(m)assert(Observable.isObservable(m),"\084\114\097\110\115\102\111\114\109\101\114 \109\117\115\116 \114\101\116\117\114\110 \097\110 \111\098\115\101\114\118\097\098\108\101")end return m end
--[=[
	Transforms the observable with the following transformers

	```lua
	Rx.of(1, 2, 3):Pipe({
		Rx.map(function(result)
			return result + 1
		end);
		Rx.map(function(value)
			return ("%0.2f"):format(value)
		end);
	}):Subscribe(print)

	--> 2.00
	--> 3.00
	--> 4.00
	```
	@param transformers { (observable: Observable<T>) -> Observable<T> }
	@return Observable<T>
]=]
function Observable:Pipe(transformers)
	assert(type(transformers) == "table", "Bad transformers")

	local current = self
	for _, transformer in pairs(transformers) do
		assert(type(transformer) == "function", "Bad transformer")
		current = transformer(current)
		assert(Observable.isObservable(current), "Transformer must return an observable")
	end

	return current
end
