On Saturday, 31 March 2018 at 16:08:36 UTC, lempiji wrote:


-----------
import rx;

auto firstWord = new BehaviorSubject!string("Change");
auto secondWord = new BehaviorSubject!string("me!");

auto bothWords = new BehaviorSubject!string("");
combineLatest!((a, b) => a ~ " " ~ b)(firstWord, secondWord).doSubscribe(bothWords);

writeln(bothWords.value); // Change me!

firstWord.value = "TEST";
writeln(bothWords.value); // TEST me!
-----------

Thanks! I will play with it.
  • Reactive data crimaniak via Digitalmars-d-learn
    • Re: Reactive data lempiji via Digitalmars-d-learn
      • Re: Reactive data crimaniak via Digitalmars-d-learn

Reply via email to