--[=[
	http://reactivex.io/documentation/operators/just.html

	```lua
	Rx.of(1, 2, 3):Subscribe(print, function()
		print("Complete")
	end)) --> 1, 2, 3, "Complete"
	```

	@param ... any -- Arguments to emit
	@return Observable
]=]

function Rx.of(...)
	local args = table.pack(...)

	return Observable.new(function(sub)
		for i=1, args.n do
			sub:Fire(args[i])
		end

		sub:Complete()
	end)
end
