any

template any(alias pred = "true")
AnyObservable!(TObservable, pred)
any
(
TObservable
)
(
auto ref TObservable observable
)

Examples

1 import rx.subject : SubjectObject;
2 
3 auto sub = new SubjectObject!int;
4 
5 bool result = false;
6 sub.any!("a % 2 == 0").doSubscribe((bool) { result = true; });
7 
8 assert(result == false);
9 sub.put(1);
10 assert(result == false);
11 sub.put(0);
12 assert(result == true);