Created
April 10, 2015 08:35
-
-
Save masuhajime/fbb54315f5fa88d63a88 to your computer and use it in GitHub Desktop.
rxcpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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