Closed hasyimibhar closed 9 years ago
that operator has not been added yet, so for now one would explicitly use reduce
.
rx::observable<>::range(1, 10).
reduce(std::list<int>(),
[](std::list<int>& o, int v){
o.push_back(v);
return std::move(o);
},
[](std::list<int>& o){
return std::move(o);
}).
as_blocking().
subscribe(
[](std::list<int> ten){
for(auto v : ten){
printf("%d\n", v);
}
});
Good enough for now. :)
contributions welcome!
What's the equivalent of RxJava's
toList
in RxCpp?