#include <rpp/rpp.hpp>
#include <iostream>
#include <string>
int main()
{
|
rpp::operators::reduce(std::string{}, [](std::string&& seed,
int v) {
return std::move(seed) + std::to_string(v) +
","; })
return 0;
}
auto reduce(Seed &&seed, Accumulator &&accumulator)
Apply a function to each item emitted by an Observable, sequentially, and emit the final value.
Definition reduce.hpp:143
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition from.hpp:201
auto subscribe(observer< Type, ObserverStrategy > &&observer)
Subscribes passed observer to emissions from this observable.
Definition subscribe.hpp:226