1 #include "rxcpp/rx.hpp" 2 3 #include "rxcpp/rx-test.hpp" 4 #include "catch.hpp" 5 6 SCENARIO("distinct sample"){ 7 printf("//! [distinct sample]\n"); 8 auto values = rxcpp::observable<>::from(1, 2, 2, 3, 3, 3, 4, 5, 5).distinct(); 9 values. 10 subscribe( __anona4fa2c710102(int v)11 [](int v){printf("OnNext: %d\n", v);}, __anona4fa2c710202()12 [](){printf("OnCompleted\n");}); 13 printf("//! [distinct sample]\n"); 14 } 15 16