Skip to content

Instantly share code, notes, and snippets.

@masuhajime
Created April 10, 2015 08:35
Show Gist options
  • Save masuhajime/fbb54315f5fa88d63a88 to your computer and use it in GitHub Desktop.
Save masuhajime/fbb54315f5fa88d63a88 to your computer and use it in GitHub Desktop.
rxcpp
int main(int argc, char** argv)
{
auto get_nums = [](){return rx::observable<>::from<int>(
1,2,3,4,5,6,7,8,9,10
);};
auto hello_str = [&](){return get_nums().map([](int n){
return std::to_string(n).c_str();
}).as_dynamic();};
hello_str().subscribe(rxu::println(std::cout));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment