ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
start_with.cpp
#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
| rpp::ops::start_with(5, 6)
| rpp::ops::subscribe([](int v) { std::cout << v << " "; });
// Output: 5 6 1 2 3
| rpp::ops::start_with(rpp::source::just(5), rpp::source::just(6))
| rpp::ops::subscribe([](int v) { std::cout << v << " "; });
// Output: 5 6 1 2 3
| rpp::ops::start_with_values(rpp::source::just(5), rpp::source::just(6))
| rpp::ops::merge()
| rpp::ops::subscribe([](int v) { std::cout << v << " "; });
// Output: 5 6 1
return 0;
}
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition from.hpp:201