iff<T> function
Observable<T>
iff<T>(
- Predicate0 condition, [
- Observable<
T> ? trueBranch, - Observable<
T> ? falseBranch
Decides at subscription time which Observable will actually be subscribed to.
Implementation
Observable<T> iff<T>(Predicate0 condition,
[Observable<T>? trueBranch, Observable<T>? falseBranch]) =>
defer(() => condition() ? trueBranch ?? empty() : falseBranch ?? empty());